Rewrite NWItem to not allow handle to be None

This commit is contained in:
Veronica Berglyd Olsen
2023-07-21 22:52:54 +02:00
parent 4dfa51855e
commit 9a1a2d9ab2
7 changed files with 125 additions and 120 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ class DocDuplicator:
hMap: dict[str, str | None] = {t: None for t in items}
for tHandle in items:
newItem = self._project.tree.duplicate(tHandle)
if newItem is None or newItem.itemHandle is None:
if newItem is None:
return
hMap[tHandle] = newItem.itemHandle
if newItem.itemParent in hMap: