mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-26 01:01:53 +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:
parent
374caa0d9a
commit
941100a8a3
@ -75,8 +75,10 @@ def set_dummy_entrance(id, slug, cave, msg="DUMMY"):
|
|||||||
try:
|
try:
|
||||||
entrance = dummy_entrance(id, slug, msg="DUMMY")
|
entrance = dummy_entrance(id, slug, msg="DUMMY")
|
||||||
entrances_xslug[slug] = entrance
|
entrances_xslug[slug] = entrance
|
||||||
CaveAndEntrance.objects.update_or_create(cave=cave, entrance_letter="", entrance=entrance)
|
#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
|
||||||
message = f" - Note: Dummy Entrance successfully set for entrance {id} on cave {cave}"
|
#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}")
|
DataIssue.objects.create(parser="entrances", message=message, url=f"{cave.url}")
|
||||||
# print(message)
|
# print(message)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user