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: v9.1.0^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F10418%2F1;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 Signed-off-by: garciadeblas --- 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(