Selaa lähdekoodia

fixed getDoIds (pass in getDo)

Darren Ranalli 19 vuotta sitten
vanhempi
sitoutus
be255e6bbd

+ 2 - 1
direct/src/distributed/DoCollectionManager.py

@@ -97,7 +97,8 @@ class DoCollectionManager:
             for i in self.getDoIdList(parentId, zoneId, classType)]
 
     def getDoIdList(self, parentId, zoneId=None, classType=None):
-        return self._doHierarchy.getDoIds(parentId, zoneId, classType)
+        return self._doHierarchy.getDoIds(self.getDo,
+                                          parentId, zoneId, classType)
 
     def getOwnerViewDoList(self, classType):
         assert self.hasOwnerView()

+ 2 - 2
direct/src/distributed/DoHierarchy.py

@@ -24,7 +24,7 @@ class DoHierarchy:
         self._table = {}
         self._allDoIds = set()
 
-    def getDoIds(self, parentId, zoneId=None, classType=None):
+    def getDoIds(self, getDo, parentId, zoneId=None, classType=None):
         """
         Moved from DoCollectionManager
         ==============================
@@ -52,7 +52,7 @@ class DoHierarchy:
         if classType is not None:
             a = []
             for doId in r:
-                obj = self.getDo(doId)
+                obj = getDo(doId)
                 if isinstance(obj, classType):
                     a.append(doId)
             r = a