1
0

jsondb: write storage in __init__, in case there was a db upgrade

This commit is contained in:
ThomasV
2023-09-23 14:05:18 +02:00
parent 56e80c20d7
commit 517cef8248

View File

@@ -176,6 +176,9 @@ class JsonDB(Logger):
data = self.load_data(s)
# convert to StoredDict
self.data = StoredDict(data, self, [])
# write file in case there was a db upgrade
if self.storage and self.storage.file_exists():
self.write()
def load_data(self, s:str) -> dict:
""" overloaded in wallet_db """