summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-09-08 19:51:04 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-09-08 19:51:04 +0300
commit5a191ee554488ff8cf3668f011440edecf671e49 (patch)
tree356f3fd8c4606dfeaccaa1cff1f1cec937ab5a81 /parsers/caves.py
parent7779544c0ca3bc5329ccc010ff3f31edbb2f037e (diff)
downloadtroggle-5a191ee554488ff8cf3668f011440edecf671e49.tar.gz
troggle-5a191ee554488ff8cf3668f011440edecf671e49.tar.bz2
troggle-5a191ee554488ff8cf3668f011440edecf671e49.zip
Big refactor of cave lookuo & creation. Works.
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index c16a577..982fb40 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -133,6 +133,7 @@ def get_area(areanum):
def create_new_cave(svxpath):
"""This is called only when a new survex file is edited online which has a path on the
:loser: repo which is not recognised as a known cave.
+ ALSO called by survex parser when it finds a cave it doesn't recognise
"""
# e.g. svxpath = "caves-1623/666/antig"
print(f"Create new cave at {svxpath}")
@@ -171,7 +172,8 @@ def create_new_cave(svxpath):
print(message)
raise
- # we know what the survex file is, we don't need to use the guess
+ # we know what the survex file is, we don't need to use the guess.
+ # But this sets the survex file on he cave from the first one we find, not necessarily the best survex file for this cave
cave.survex_file=survex_file
cave.save()
return cave