2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 06:37:16 +00:00

fix non-appearing cave id info on wallets

This commit is contained in:
2025-07-12 17:30:40 +03:00
parent dbec098bba
commit 5f1b01bea7
2 changed files with 14 additions and 14 deletions

View File

@@ -245,13 +245,21 @@ class Wallet(models.Model):
return None
#cavelist = jsondata["cave"]
cavelist = Wallet.input_to_list(jsondata["cave"])
from troggle.core.models.troggle import DataIssue
for i in cavelist:
if not i:
continue
#print(f"Attempting adding cave '{i}' to wallet {self} ")
try:
caveobject = get_cave_leniently(i)
caveobject = get_cave_leniently(i.strip())
print(f"Attempting adding cave '{caveobject}' to wallet {self} ")
if caveobject:
self.caves.add(caveobject)
except:
print(f"FAIL adding cave to wallet.caves '{i}'")
message = f"FAIL adding cave {caveobject} to wallet.caves '{i}'"
DataIssue.objects.update_or_create(parser="wallets", message=message, url=wurl)
print(message)
pass
def year(self):