mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
stop crash onloading wallet with blank caveid
This commit is contained in:
parent
4e4824546a
commit
26e96839e4
@ -237,8 +237,11 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
|
|||||||
i = i.replace("/", "-")
|
i = i.replace("/", "-")
|
||||||
caveobject = getCave(i) # only the last one gets recorded.. ouch.
|
caveobject = getCave(i) # only the last one gets recorded.. ouch.
|
||||||
else:
|
else:
|
||||||
caveid = caveid
|
caveid = caveid # ?urk? why?
|
||||||
caveobject = getCave(caveid)
|
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}')
|
print(f'getCave for id "{waldata["cave"]}" {caveobject}')
|
||||||
# if not caveobject.url == waldata["description url"]:
|
# 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.')
|
# 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.')
|
||||||
|
Loading…
Reference in New Issue
Block a user