forked from expo/troggle
bugfix
This commit is contained in:
parent
b20e6c5a58
commit
bb65ffaee6
@ -162,6 +162,7 @@ def get_complaints(complaints, waldata, svxfiles, files):
|
||||
complaints.append("The cave description website is marked as needing updating using the guidebook description from the survex file. Tick the 'Website updated' checkbox when this is done.")
|
||||
|
||||
# FInd the cave, if it exists
|
||||
if waldata["cave"]:
|
||||
try:
|
||||
caveobject = getCave(waldata["cave"])
|
||||
print(f'getCave for id "{waldata["cave"]}" {caveobject}')
|
||||
@ -173,6 +174,9 @@ def get_complaints(complaints, waldata, svxfiles, files):
|
||||
except ObjectDoesNotExist:
|
||||
complaints.append(f'The cave ID \'{waldata["cave"]}\' is not recognised. Please fix it.')
|
||||
caveobject = None
|
||||
else:
|
||||
complaints.append(f'No cave ID is given. Please give an ID, even if it is just "surface survey" or "scraps found in hut"')
|
||||
caveobject = None
|
||||
|
||||
|
||||
return complaints, caveobject
|
||||
|
Loading…
Reference in New Issue
Block a user