mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
obviate meaningless error messages
This commit is contained in:
parent
5a90e7b727
commit
9489b9209d
@ -44,9 +44,13 @@ class Wallet(models.Model):
|
||||
wyear = fp.parent.name
|
||||
wurl = f"/walletedit/{self.walletname}" # .replace('#', ':')
|
||||
|
||||
if len(wyear) != 4 or len(wname) !=6:
|
||||
# no contents.json for old-style wallets
|
||||
return None
|
||||
|
||||
jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json"
|
||||
if not Path(jsonfile).is_file():
|
||||
print(f'{jsonfile} is not a file')
|
||||
print(f'{jsonfile} is not a file {wyear=} {wname=} ')
|
||||
return None
|
||||
else:
|
||||
with open(jsonfile) as json_f:
|
||||
|
Loading…
Reference in New Issue
Block a user