From 2c4f9ec63fb977be6df40053be3ea50e409cf97f Mon Sep 17 00:00:00 2001 From: garciaale Date: Mon, 1 Mar 2021 11:04:50 -0300 Subject: [PATCH] Fixes bug 1456 by returning default empty list in case no vdu-profile is present Change-Id: Ia1d65872771f9010f753dfe839cd22ed75d5b02e Signed-off-by: garciaale --- osm_nbi/descriptor_topics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 0ad3e83..d6b2884 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -625,7 +625,7 @@ class VnfdTopic(DescriptorTopic): for df in indata["df"]: if "lcm-operations-configuration" in df and "operate-vnf-op-config" in df["lcm-operations-configuration"]: configs = df["lcm-operations-configuration"]["operate-vnf-op-config"].get("day1-2", []) - vdus = df["vdu-profile"] + vdus = df.get("vdu-profile", []) for vdu in vdus: for config in configs: if config["id"] == vdu["id"] and utils.find_in_list( -- 2.25.1