aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog/packages/biz/ns_descriptor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/catalog/packages/biz/ns_descriptor.py b/catalog/packages/biz/ns_descriptor.py
index 18f6b88d..8f549999 100644
--- a/catalog/packages/biz/ns_descriptor.py
+++ b/catalog/packages/biz/ns_descriptor.py
@@ -66,6 +66,9 @@ class NsDescriptor(object):
ns_pkgs = NSPackageModel.objects.filter(nsdId=nsdId)
else:
ns_pkgs = NSPackageModel.objects.all()
+ if not ns_pkgs.exists():
+ logger.debug("NSD infos does not exist.")
+ return []
response_data = []
for ns_pkg in ns_pkgs:
data = self.fill_resp_data(ns_pkg)