Merge "resolve packages depending"
authoryunlong ying <ying.yunlong@zte.com.cn>
Thu, 18 Jul 2019 06:32:33 +0000 (06:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 18 Jul 2019 06:32:33 +0000 (06:32 +0000)
lcm/ns/biz/ns_get.py
lcm/pub/redisco/containers.py

index e023a1b..b406a79 100644 (file)
@@ -38,7 +38,11 @@ class GetNSInfoService(object):
             ns_insts = NSInstModel.objects.filter(id=ns_inst_id)
         else:
             ns_insts = NSInstModel.objects.all()
-        return [self.get_single_ns_info(ns_inst, is_sol) for ns_inst in ns_insts]
+        result = []
+        for ns_inst in ns_insts:
+            if ns_insts and ns_insts[0].status != 'null':
+                result.append(self.get_single_ns_info(ns_inst, is_sol))
+        return result
 
     def get_single_ns_info(self, ns_inst, is_sol=False):
         if is_sol:
index 8957294..4f2d10c 100644 (file)
@@ -67,7 +67,7 @@ class Container(object):
         if hasattr(self, 'db_cache') and self.db_cache:
             return self.db_cache
         else:
-            from redisco import connection
+            from lcm.pub.redisco import connection
             self.db_cache = connection
             return self.db_cache