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:
|
if trackId in self:
|
||||||
del self[trackId]
|
del self[trackId]
|
||||||
|
|
||||||
def indexTrack(self, trackNum, track):
|
def indexTrack(self, trackNum, track, idx=None):
|
||||||
ixd = track.indexdata
|
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:
|
for attr in self.indexAttributes:
|
||||||
value = ixd[attr]
|
value = data[attr]
|
||||||
if value is not None:
|
if value is None:
|
||||||
|
self.indexes[attr].unindex_doc(trackNum)
|
||||||
|
else:
|
||||||
self.indexes[attr].index_doc(trackNum, value)
|
self.indexes[attr].index_doc(trackNum, value)
|
||||||
taskId = ixd['taskId']
|
taskId = data['taskId']
|
||||||
userName = ixd['userName']
|
userName = data['userName']
|
||||||
if taskId not in self.taskUsers:
|
if taskId not in self.taskUsers:
|
||||||
self.taskUsers[taskId] = OOBTree.OOTreeSet()
|
self.taskUsers[taskId] = OOBTree.OOTreeSet()
|
||||||
self.taskUsers[taskId].update([userName])
|
self.taskUsers[taskId].update([userName])
|
||||||
|
|
Loading…
Add table
Reference in a new issue