diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/models/wallets.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/models/wallets.py b/core/models/wallets.py index b357344..4fa5ef2 100644 --- a/core/models/wallets.py +++ b/core/models/wallets.py @@ -111,12 +111,12 @@ class Wallet(models.Model): def get_json(self): """Read the JSON file for the wallet and do stuff - Do it every time it is queried, to be sure the result is fresh + Do it every time it is queried, to be sure the result is fresh.. well, no. + Do it every time we have a new python instance. import DataIssue locally to prevent import cycle problem""" if hasattr(self, "JSONdata"): - print(f'seen it already {self}') return self.JSONdata # :drawings: walletjson/2022/2022#01/contents.json @@ -184,8 +184,7 @@ class Wallet(models.Model): def allcaves(self): """Reads all the JSON data just to get the JSON date.""" if not (jsondata := self.get_json()): # WALRUS - print(f"Failed to read JSON file {self}") - return None + return None cavelist = jsondata["cave"] if type(cavelist) is list: for i in cavelist: |