Clean up handling of root and class info for items

This commit is contained in:
Veronica Berglyd Olsen
2022-04-03 17:45:17 +02:00
parent 37970bd446
commit bdde6a2080
7 changed files with 121 additions and 100 deletions
+2 -2
View File
@@ -227,10 +227,10 @@ class NWIndex():
if theItem.itemParent is None:
logger.info("Not indexing orphaned item '%s'", tHandle)
return False
if self.theProject.projTree.isTrashRoot(theItem.itemParent):
if theItem.itemClass == nwItemClass.TRASH:
logger.debug("Not indexing trash item '%s'", tHandle)
return False
if self.theProject.projTree.getItemClass(tHandle) == nwItemClass.ARCHIVE:
if theItem.itemClass == nwItemClass.ARCHIVE:
logger.debug("Not indexing archived item '%s'", tHandle)
return False