From: garciaale Date: Mon, 1 Mar 2021 14:04:50 +0000 (-0300) Subject: Fixes bug 1456 by returning default empty list in case no vdu-profile is present X-Git-Tag: branch-sol006v331-start~6 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=2c4f9ec63fb977be6df40053be3ea50e409cf97f;p=osm%2FNBI.git Fixes bug 1456 by returning default empty list in case no vdu-profile is present Change-Id: Ia1d65872771f9010f753dfe839cd22ed75d5b02e Signed-off-by: garciaale --- 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(