jsondb: write storage in __init__, in case there was a db upgrade
This commit is contained in:
@@ -176,6 +176,9 @@ class JsonDB(Logger):
|
|||||||
data = self.load_data(s)
|
data = self.load_data(s)
|
||||||
# convert to StoredDict
|
# convert to StoredDict
|
||||||
self.data = StoredDict(data, self, [])
|
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:
|
def load_data(self, s:str) -> dict:
|
||||||
""" overloaded in wallet_db """
|
""" overloaded in wallet_db """
|
||||||
|
|||||||
Reference in New Issue
Block a user