diff options
author | Martin Green <martin.speleo@gmail.com> | 2023-04-30 19:03:09 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2023-04-30 19:03:09 +0100 |
commit | 941100a8a3923f3c2831190f3a5fa2a81c9cd7e7 (patch) | |
tree | bef1cc958996c7ccbf3600d460fda63fdd2967d3 /parsers/caves.py | |
parent | 374caa0d9ac2bcf2c650054756a2fa0f6d1d0775 (diff) | |
download | troggle-941100a8a3923f3c2831190f3a5fa2a81c9cd7e7.tar.gz troggle-941100a8a3923f3c2831190f3a5fa2a81c9cd7e7.tar.bz2 troggle-941100a8a3923f3c2831190f3a5fa2a81c9cd7e7.zip |
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.
Diffstat (limited to 'parsers/caves.py')
-rw-r--r-- | parsers/caves.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parsers/caves.py b/parsers/caves.py index 97d3b0a..fbe9788 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -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: |