summaryrefslogtreecommitdiffstats
path: root/core/views/wallets_edit.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-10-21 22:31:33 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-10-21 22:31:33 +0300
commit1641dfe5f199e26607e8367395f4f8aa04eb376b (patch)
treeefed94787898f8d395c8a1e8113a369bdd60b0e7 /core/views/wallets_edit.py
parente7a0c57330a9c3808531b4d401d0cedf0f0c0638 (diff)
downloadtroggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.tar.gz
troggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.tar.bz2
troggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.zip
tidy with new multicave wallets
Diffstat (limited to 'core/views/wallets_edit.py')
-rw-r--r--core/views/wallets_edit.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/views/wallets_edit.py b/core/views/wallets_edit.py
index a9022f3..c99201b 100644
--- a/core/views/wallets_edit.py
+++ b/core/views/wallets_edit.py
@@ -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: