From ad0ccf8a568690e31a26c1672933f43736d9992d Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 12 Jun 2020 17:22:48 +0200 Subject: [PATCH] Fixed return of no meta data --- nw/core/document.py | 2 +- nw/core/project.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nw/core/document.py b/nw/core/document.py index b9d3de83..835ecdba 100644 --- a/nw/core/document.py +++ b/nw/core/document.py @@ -206,7 +206,7 @@ class NWDoc(): """ if len(self.docMeta) < 14: # Not enough information - return "", [] + return "", [], None, None theMeta = self.docMeta diff --git a/nw/core/project.py b/nw/core/project.py index 53286656..3db93bf2 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -1081,6 +1081,11 @@ class NWProject(): nOrph += 1 oName = "Orphaned File %d" % nOrph + if oClass is None: + oClass = nwItemClass.NO_CLASS + if oLayout is None: + oLayout = nwItemLayout.NO_LAYOUT + orphItem = NWItem(self) orphItem.setName(oName) orphItem.setType(nwItemType.FILE)