2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 05:55:06 +00:00

bugfixes and enabling older wallets to be found and listed

This commit is contained in:
Philip Sargent
2022-09-22 22:41:42 +03:00
parent af88cb4d0f
commit aa20692ad6
4 changed files with 34 additions and 23 deletions

View File

@@ -225,6 +225,8 @@ class Wallet(models.Model):
return waldata
def year(self):
if len(self.walletname) < 5:
return None
if self.walletname[4] != "#":
return None
year = int(self.walletname[0:4])
@@ -352,8 +354,11 @@ class Wallet(models.Model):
ticks["Q"] = "green"
else:
ticks["Q"] = survexok
if int(self.year()) < 2015:
ticks["Q"] = "lightgrey"
if not self.year():
ticks["Q"] = "darkgrey"
else:
if int(self.year()) < 2015:
ticks["Q"] = "lightgrey"
# Notes, Plan, Elevation; Tunnel