summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/survex.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index 76acda6..6274b1f 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -508,7 +508,8 @@ class LoadingSurvex():
def LoadSurvexQM(self, survexblock, qmline):
insp = self.insp
- qm_no = qmline.group(1)
+ qm_no = qmline.group(1) # this may not be unique across multiple survex files
+
qm_grade = qmline.group(2)
if qmline.group(3): # usual closest survey station
qm_nearest = qmline.group(3)
@@ -537,7 +538,8 @@ class LoadingSurvex():
# so we create a dummy one anyway. We should make logbook entry links optional in QMs in future and
# remove this hack.
qmyear = str(survexblock.date)[:4]
- logslug = f'DUM_{int(qmyear)}_{int(qm_no):03d}'
+ blockname = survexblock.name
+ logslug = f'DUM_{int(qmyear)}_{blockname}_{int(qm_no):03d}'
if survexblock.survexfile.cave:
caveslug = survexblock.survexfile.cave.slug()
place = survexblock.survexfile.cave
@@ -565,6 +567,7 @@ class LoadingSurvex():
nearest_station_name=qm_nearest,
grade=qm_grade.upper(),
location_description=qm_notes,
+ blockname = blockname, # only set for survex-imported QMs
found_by = placeholder,
cave = survexblock.survexfile.cave)
qm.save