diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-07-14 11:21:49 +0200 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-07-14 11:21:49 +0200 |
commit | 4e4824546ac32f47670bf8050481706c486b65e9 (patch) | |
tree | 039de2b9e4405b3a1bc53a617dce49b91918327c /core/models/wallets.py | |
parent | 387bdf4f91c5ee0cd3d0c4b49a4addda4f7517f5 (diff) | |
download | troggle-4e4824546ac32f47670bf8050481706c486b65e9.tar.gz troggle-4e4824546ac32f47670bf8050481706c486b65e9.tar.bz2 troggle-4e4824546ac32f47670bf8050481706c486b65e9.zip |
stop crash on live system
Diffstat (limited to 'core/models/wallets.py')
-rw-r--r-- | core/models/wallets.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/models/wallets.py b/core/models/wallets.py index 6d217c6..9da5695 100644 --- a/core/models/wallets.py +++ b/core/models/wallets.py @@ -53,6 +53,7 @@ class Wallet(models.Model): jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json" if not Path(jsonfile).is_file(): print(f'{jsonfile} is not a file {wyear=} {wname=} ') + # Should this be a DataIssue? return None else: with open(jsonfile) as json_f: @@ -60,8 +61,9 @@ class Wallet(models.Model): waldata = json.load(json_f) except: message = f"! {str(self.walletname)} Failed to load {jsonfile} JSON file" - # print(message) - raise + print(message) + # Should this be a DataIssue? + return None if waldata["date"]: datestr = waldata["date"].replace(".", "-") try: |