We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c9402b commit 1c81a19Copy full SHA for 1c81a19
nottodbox/scripts/widgets/documents.py
@@ -177,10 +177,11 @@ def __init__(self, parent: BackupView) -> None:
177
self.setUniformItemSizes(False)
178
179
def appendAll(self) -> None:
180
- backups = json.loads(self.parent_.index.data(ITEM_DATAS["backup"]))
+ if self.parent_.index.data(ITEM_DATAS["backup"]) is not None and self.parent_.index.data(ITEM_DATAS["backup"]) != "":
181
+ backups = json.loads(self.parent_.index.data(ITEM_DATAS["backup"]))
182
- for date, content in backups.items():
183
- self.appendItem(date, content)
+ for date, content in backups.items():
184
+ self.appendItem(date, content)
185
186
def appendItem(self, date: str, content: str) -> None:
187
self.items[date] = QStandardItem()
0 commit comments