work in progress: orders and order items
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3112 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
1f72392904
commit
3f41ede717
1 changed files with 14 additions and 6 deletions
|
@ -217,14 +217,22 @@ class TrackingStorage(BTreeContainer):
|
|||
if trackId in self:
|
||||
del self[trackId]
|
||||
|
||||
def indexTrack(self, trackNum, track):
|
||||
ixd = track.indexdata
|
||||
def indexTrack(self, trackNum, track, idx=None):
|
||||
if not trackNum:
|
||||
trackNum = int(track.__name__)
|
||||
data = track.indexdata
|
||||
if idx is not None:
|
||||
if idx not in self.indexAttributes:
|
||||
raise ValueError("Index '%s' not available." % (idx))
|
||||
return self.indexes[idx].index_doc(trackNum, data[idx])
|
||||
for attr in self.indexAttributes:
|
||||
value = ixd[attr]
|
||||
if value is not None:
|
||||
value = data[attr]
|
||||
if value is None:
|
||||
self.indexes[attr].unindex_doc(trackNum)
|
||||
else:
|
||||
self.indexes[attr].index_doc(trackNum, value)
|
||||
taskId = ixd['taskId']
|
||||
userName = ixd['userName']
|
||||
taskId = data['taskId']
|
||||
userName = data['userName']
|
||||
if taskId not in self.taskUsers:
|
||||
self.taskUsers[taskId] = OOBTree.OOTreeSet()
|
||||
self.taskUsers[taskId].update([userName])
|
||||
|
|
Loading…
Add table
Reference in a new issue