2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00

Previously if a cave was found without an entrance an entrance was added to the database. However as this was not also added as a file, the new entrance could not be edited via the web interface. Without an entrance being made, they can still be added.

This commit is contained in:
Martin Green 2023-04-30 19:03:09 +01:00
parent 374caa0d9a
commit 941100a8a3

View File

@ -75,8 +75,10 @@ def set_dummy_entrance(id, slug, cave, msg="DUMMY"):
try:
entrance = dummy_entrance(id, slug, msg="DUMMY")
entrances_xslug[slug] = entrance
CaveAndEntrance.objects.update_or_create(cave=cave, entrance_letter="", entrance=entrance)
message = f" - Note: Dummy Entrance successfully set for entrance {id} on cave {cave}"
#Note the below line, just creates a dastabase entry and not a file, this then breaks entrance editing by the website. I am not sure if we want entrances automagically created. Therefore I have commented it out. MJG
#CaveAndEntrance.objects.update_or_create(cave=cave, entrance_letter="", entrance=entrance)
#message = f" - Note: Dummy Entrance successfully set for entrance {id} on cave {cave}"
message = f" - Note: Missing Entrance for entrance {id} on cave {cave}"
DataIssue.objects.create(parser="entrances", message=message, url=f"{cave.url}")
# print(message)
except: