workaround for old tracking storages: create 'runs' object on the fly

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1907 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-08-11 12:38:47 +00:00
parent 78f0320c57
commit 65564049ec

View file

@ -57,6 +57,7 @@ class TrackingStorage(BTreeContainer):
implements(ITrackingStorage)
trackNum = runId = 0
runs = None
indexAttributes = ('taskId', 'runId', 'userName', 'timeStamp')
@ -94,6 +95,8 @@ class TrackingStorage(BTreeContainer):
return 0
def getRun(self, taskId=None, runId=0):
if self.runs is None:
self.runs = IOBTree.IOBTree()
if taskId and not runId:
runId = self.currentRuns.get(taskId)
if runId: