2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-04-04 09:51:47 +01:00

make more robust

This commit is contained in:
Philip Sargent 2024-08-11 14:07:26 +03:00
parent 581f0259e2
commit e64cb212c1

View File

@ -155,7 +155,9 @@ class Wallet(models.Model):
wname = fp.name wname = fp.name
wyear = fp.parent.name wyear = fp.parent.name
if not int(wyear): try:
y = int(wyear)
except:
message = f"! Subfolder detected?:\n {wyear=} (should be eg. '2023')\n {wname=} \n {self.fpath=}" message = f"! Subfolder detected?:\n {wyear=} (should be eg. '2023')\n {wname=} \n {self.fpath=}"
print(message) print(message)
wurl = self.get_url() wurl = self.get_url()