always check for correct index setup upon indexing a track
This commit is contained in:
parent
2bc3267e9b
commit
cb365aaea2
1 changed files with 3 additions and 2 deletions
|
@ -140,11 +140,12 @@ class TrackingStorage(BTreeContainer):
|
|||
|
||||
def setupIndexes(self):
|
||||
changed = False
|
||||
for idx in self.indexAttributes:
|
||||
for idx in self.trackFactory.index_attributes:
|
||||
if idx not in self.indexes:
|
||||
self.indexes[idx] = FieldIndex()
|
||||
changed = True
|
||||
if changed:
|
||||
self.indexAttributes = self.trackFactory.index_attributes
|
||||
self.reindexTracks()
|
||||
|
||||
def idFromNum(self, num):
|
||||
|
@ -235,7 +236,7 @@ class TrackingStorage(BTreeContainer):
|
|||
self.unindexTrack(trackNum, track)
|
||||
|
||||
def indexTrack(self, trackNum, track, idx=None):
|
||||
#self.setupIndexes()
|
||||
self.setupIndexes()
|
||||
if not trackNum:
|
||||
trackNum = int(track.__name__)
|
||||
data = track.indexdata
|
||||
|
|
Loading…
Add table
Reference in a new issue