forked from expo/troggle
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
|
wyear = fp.parent.name
|
||||||
wurl = f"/walletedit/{self.walletname}" # .replace('#', ':')
|
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"
|
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')
|
print(f'{jsonfile} is not a file {wyear=} {wname=} ')
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
with open(jsonfile) as json_f:
|
with open(jsonfile) as json_f:
|
||||||
|
Loading…
Reference in New Issue
Block a user