mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 22:37:05 +00:00
stop crash on live system
This commit is contained in:
@@ -53,6 +53,7 @@ class Wallet(models.Model):
|
|||||||
jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json"
|
jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json"
|
||||||
if not Path(jsonfile).is_file():
|
if not Path(jsonfile).is_file():
|
||||||
print(f'{jsonfile} is not a file {wyear=} {wname=} ')
|
print(f'{jsonfile} is not a file {wyear=} {wname=} ')
|
||||||
|
# Should this be a DataIssue?
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
with open(jsonfile) as json_f:
|
with open(jsonfile) as json_f:
|
||||||
@@ -60,8 +61,9 @@ class Wallet(models.Model):
|
|||||||
waldata = json.load(json_f)
|
waldata = json.load(json_f)
|
||||||
except:
|
except:
|
||||||
message = f"! {str(self.walletname)} Failed to load {jsonfile} JSON file"
|
message = f"! {str(self.walletname)} Failed to load {jsonfile} JSON file"
|
||||||
# print(message)
|
print(message)
|
||||||
raise
|
# Should this be a DataIssue?
|
||||||
|
return None
|
||||||
if waldata["date"]:
|
if waldata["date"]:
|
||||||
datestr = waldata["date"].replace(".", "-")
|
datestr = waldata["date"].replace(".", "-")
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user