mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 02:37:14 +00:00
tidy with new multicave wallets
This commit is contained in:
@@ -244,7 +244,7 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
|
||||
w.caves.add(caveobject) # new many-to-many field
|
||||
#print(w.caves)
|
||||
else:
|
||||
# either single cave or the square barckets have been removed
|
||||
# either single cave or the square brackets have been removed
|
||||
ids = caveid.split(",")
|
||||
for i in ids:
|
||||
j = i.replace("'","").strip('[] "')
|
||||
@@ -254,7 +254,6 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
|
||||
w.caves.add(caveobject)
|
||||
except:
|
||||
pass
|
||||
print(f'get_cave_leniently from "{waldata["cave"]}" => {caveobject}')
|
||||
# if not caveobject.url == waldata["description url"]:
|
||||
# complaints.append(f'The URL of cave description \"{waldata["description url"]}\" does not match the one on record for this cave which is: "{caveobject.url}". If the wallet is not for a cave, put a useful URL here.')
|
||||
except Cave.MultipleObjectsReturned:
|
||||
@@ -573,7 +572,9 @@ def walletedit(request, path=None):
|
||||
svxf = svxf.with_suffix(".svx")
|
||||
f = Path(settings.SURVEX_DATA) / svxf
|
||||
if not f.is_file():
|
||||
message = f"Specified survex file '{fpath}' in database not found on disc"
|
||||
message = f"! {wallet} Specified survex file '{svxf}' in wallet not found on disc, probably renamed."
|
||||
DataIssue.objects.update_or_create(parser="wallets", message=message, url=wurl) # set URL to this wallet folder
|
||||
|
||||
print(message)
|
||||
continue
|
||||
|
||||
@@ -582,7 +583,7 @@ def walletedit(request, path=None):
|
||||
try:
|
||||
svxfile = SurvexFile.objects.get(path=fpath)
|
||||
except:
|
||||
message = f"Specified survex file '{fpath}'not found? database may be empty. Exception."
|
||||
message = f"Specified and present survex file '{fpath}'not found in db. Database may be empty. Exception."
|
||||
print(message)
|
||||
# This failure will also get picked up by the "S" colour code red or orange
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user