diff options
author | hewei-cmss <hewei@cmss.chinamobile.com> | 2019-10-18 16:49:19 +0800 |
---|---|---|
committer | hewei-cmss <hewei@cmss.chinamobile.com> | 2019-10-18 16:49:19 +0800 |
commit | 2e065369333b4fe2177c8a35492b799ea4eae444 (patch) | |
tree | 26031341c623271473fec206bd1b1b243da1d5ef | |
parent | 525c141158ec2b9598806f0ae13752895d476681 (diff) |
Fix query nsd
Issue-ID: VFC-1504
Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com>
Change-Id: I624e26c39c04708b068a97fd31a2b0b85171fd89
-rw-r--r-- | catalog/packages/biz/ns_descriptor.py | 3 |
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) |