diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/models/logbooks.py | 5 | ||||
-rw-r--r-- | core/views/survex.py | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/models/logbooks.py b/core/models/logbooks.py index 4932a57..5933848 100644 --- a/core/models/logbooks.py +++ b/core/models/logbooks.py @@ -162,8 +162,9 @@ class QM(TroggleModel): ("B", "B: Average lead"), ("C", "C: Tight unpromising lead"), ("D", "D: Dig"), - ("X", "X: Unclimbable aven"), - ) # also seen "?" and "V" in imported data - see urls.py + ("X", "X: Unclimbable or horrid"), + ("V", "V: Vertical"), + ) # also seen "?" in imported data - see urls.py grade = models.CharField(max_length=1, choices=GRADE_CHOICES) location_description = models.TextField(blank=True) nearest_station_description = models.CharField(max_length=400, blank=True, null=True) diff --git a/core/views/survex.py b/core/views/survex.py index 2a750aa..5115cb7 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -344,6 +344,7 @@ def svx(request, survex_file): # collect all the survex blocks which actually have a valid date if svxfile: + has_3d = (Path(survexdatasetpath) / Path(survex_file + ".3d")).is_file() try: svxblocks = svxfile.survexblock_set.filter(date__isnull=False).order_by('date') except: @@ -353,12 +354,14 @@ def svx(request, survex_file): svxlength = 0.0 for b in svxblocksall: svxlength += b.legslength - print(svxlength,b, b.legsall) + # print(svxlength,b, b.legsall) except AttributeError: # some survexfiles just *include files and have no blocks themselves svxblocksall = [] else: svxblocks = [] svxblocksall = [] + svxlength = 0.0 + has_3d = False if not difflist: difflist = ["Survex file does not exist yet"] @@ -368,7 +371,7 @@ def svx(request, survex_file): vmap = { "settings": settings, "warning": warning, - "has_3d": (Path(survexdatasetpath) / Path(survex_file + ".3d")).is_file(), + "has_3d": has_3d, "title": survex_file, "svxlength": svxlength, "svxblocks": svxblocks, |