Fix a couple of broken checks

This commit is contained in:
Veronica K. B. Olsen
2021-01-03 01:45:05 +01:00
parent 9a4b357bcd
commit 9d9b64fc3d
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -221,6 +221,7 @@ class NWIndex():
except Exception:
self.indexBroken = True
logger.debug("Index check complete")
if self.indexBroken:
self.clearIndex()
self.theParent.makeAlert(
@@ -593,7 +594,7 @@ class NWIndex():
return theRefs
for refTitle in self.refIndex[tHandle]:
theTags = self.refIndex[tHandle][refTitle].get("tags", None)
theTags = self.refIndex[tHandle][refTitle].get("tags", [])
for aTag in theTags:
if len(aTag) == 3 and (sTitle is None or sTitle == refTitle):
theRefs[aTag[1]].append(aTag[2])
+1 -1
View File
@@ -329,7 +329,7 @@ class GuiOutlineDetails(QScrollArea):
def _formatTags(self, theRefs, theKey):
"""Format the tags as clickable links.
"""
if theKey not in theKey:
if theKey not in theRefs:
return ""
refTags = []
for tTag in theRefs[theKey]: