Restructure the record of root items in the tree class

This commit is contained in:
Veronica Berglyd Olsen
2022-04-02 19:13:54 +02:00
parent 8ddda4783d
commit f9ddcd2f8a
7 changed files with 66 additions and 33 deletions
+1 -3
View File
@@ -208,8 +208,6 @@ class NWIndex():
text.
"""
theItem = self.theProject.projTree[tHandle]
theRoot = self.theProject.projTree.getRootItem(tHandle)
if theItem is None:
logger.info("Not indexing unknown item '%s'", tHandle)
return False
@@ -232,7 +230,7 @@ class NWIndex():
if self.theProject.projTree.isTrashRoot(theItem.itemParent):
logger.debug("Not indexing trash item '%s'", tHandle)
return False
if theRoot.itemClass == nwItemClass.ARCHIVE:
if self.theProject.projTree.getItemClass(tHandle) == nwItemClass.ARCHIVE:
logger.debug("Not indexing archived item '%s'", tHandle)
return False