Fixed an issue with adding empty orphaned files to the project

This commit is contained in:
Veronica K. B. Olsen
2020-09-19 16:47:24 +02:00
parent 2ae6646885
commit f2e6c86c79
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -23,6 +23,7 @@ __pycache__
# PyTest
/prof/
/htmlcov/
/tests/temp
/tests/lipsum/cache
/tests/lipsum/meta
+4 -2
View File
@@ -1311,8 +1311,10 @@ class NWProject():
# Look for meta data
oName = ""
if aDoc.openDocument(oHandle, showStatus=False, isOrphan=True):
oName, oPath, oClass, oLayout = aDoc.getMeta()
oClass = None
oLayout = None
if aDoc.openDocument(oHandle, showStatus=False, isOrphan=True) is not None:
oName, _, oClass, oLayout = aDoc.getMeta()
if oName == "":
nOrph += 1