Fix issue with changing novel doc to note before indexing which produces duplicate entry

This commit is contained in:
Veronica K. B. Olsen
2021-01-11 21:05:55 +01:00
parent 6a159aa631
commit 2958881343
+2
View File
@@ -277,10 +277,12 @@ class NWIndex():
"updated" : round(time()), "updated" : round(time()),
} }
if itemLayout == nwItemLayout.NOTE: if itemLayout == nwItemLayout.NOTE:
self.novelIndex.pop(tHandle, None)
self.noteIndex[tHandle] = {} self.noteIndex[tHandle] = {}
isNovel = False isNovel = False
else: else:
self.novelIndex[tHandle] = {} self.novelIndex[tHandle] = {}
self.noteIndex.pop(tHandle, None)
isNovel = True isNovel = True
# Also clear references to file in tag index # Also clear references to file in tag index