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):
|
def setupIndexes(self):
|
||||||
changed = False
|
changed = False
|
||||||
for idx in self.indexAttributes:
|
for idx in self.trackFactory.index_attributes:
|
||||||
if idx not in self.indexes:
|
if idx not in self.indexes:
|
||||||
self.indexes[idx] = FieldIndex()
|
self.indexes[idx] = FieldIndex()
|
||||||
changed = True
|
changed = True
|
||||||
if changed:
|
if changed:
|
||||||
|
self.indexAttributes = self.trackFactory.index_attributes
|
||||||
self.reindexTracks()
|
self.reindexTracks()
|
||||||
|
|
||||||
def idFromNum(self, num):
|
def idFromNum(self, num):
|
||||||
|
@ -235,7 +236,7 @@ class TrackingStorage(BTreeContainer):
|
||||||
self.unindexTrack(trackNum, track)
|
self.unindexTrack(trackNum, track)
|
||||||
|
|
||||||
def indexTrack(self, trackNum, track, idx=None):
|
def indexTrack(self, trackNum, track, idx=None):
|
||||||
#self.setupIndexes()
|
self.setupIndexes()
|
||||||
if not trackNum:
|
if not trackNum:
|
||||||
trackNum = int(track.__name__)
|
trackNum = int(track.__name__)
|
||||||
data = track.indexdata
|
data = track.indexdata
|
||||||
|
|
Loading…
Add table
Reference in a new issue