From 29588813430e36328b35e7b390c5808ed86b3b79 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Mon, 11 Jan 2021 21:05:55 +0100 Subject: [PATCH] Fix issue with changing novel doc to note before indexing which produces duplicate entry --- nw/core/index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nw/core/index.py b/nw/core/index.py index f94bbf3e..d1851f5b 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -277,10 +277,12 @@ class NWIndex(): "updated" : round(time()), } if itemLayout == nwItemLayout.NOTE: + self.novelIndex.pop(tHandle, None) self.noteIndex[tHandle] = {} isNovel = False else: self.novelIndex[tHandle] = {} + self.noteIndex.pop(tHandle, None) isNovel = True # Also clear references to file in tag index