summaryrefslogtreecommitdiffstats
path: root/core/views
diff options
context:
space:
mode:
Diffstat (limited to 'core/views')
-rw-r--r--core/views/wallets_edit.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/views/wallets_edit.py b/core/views/wallets_edit.py
index 5bf0032..2387123 100644
--- a/core/views/wallets_edit.py
+++ b/core/views/wallets_edit.py
@@ -237,8 +237,11 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
i = i.replace("/", "-")
caveobject = getCave(i) # only the last one gets recorded.. ouch.
else:
- caveid = caveid
- caveobject = getCave(caveid)
+ caveid = caveid # ?urk? why?
+ try:
+ caveobject = getCave(caveid) # may fail if garbage value ,e.g. space, in wallet data
+ except MultipleObjectsReturned:
+ caveobject = None
print(f'getCave for id "{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.')