fixed getDoIds (pass in getDo)

This commit is contained in:
Darren Ranalli 2006-07-12 18:18:28 +00:00
parent 9bcd40db9b
commit be255e6bbd
2 changed files with 4 additions and 3 deletions

View File

@ -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()

View File

@ -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