This commit is contained in:
Philip Sargent 2022-07-17 15:22:26 +03:00
parent b20e6c5a58
commit bb65ffaee6

View File

@ -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.") 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 # FInd the cave, if it exists
if waldata["cave"]:
try: try:
caveobject = getCave(waldata["cave"]) caveobject = getCave(waldata["cave"])
print(f'getCave for id "{waldata["cave"]}" {caveobject}') print(f'getCave for id "{waldata["cave"]}" {caveobject}')
@ -173,6 +174,9 @@ def get_complaints(complaints, waldata, svxfiles, files):
except ObjectDoesNotExist: except ObjectDoesNotExist:
complaints.append(f'The cave ID \'{waldata["cave"]}\' is not recognised. Please fix it.') complaints.append(f'The cave ID \'{waldata["cave"]}\' is not recognised. Please fix it.')
caveobject = None 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 return complaints, caveobject