summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-03-12 00:35:37 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-03-12 00:35:37 +0000
commitb88b1423328d26081457e9d0bb5f55cf86232f24 (patch)
tree53aabd0ba57e962156aff05619ec5e768e48d890 /core
parent870b2907265310d7f050ea31bcda7c2adfaf5fea (diff)
downloadtroggle-b88b1423328d26081457e9d0bb5f55cf86232f24.tar.gz
troggle-b88b1423328d26081457e9d0bb5f55cf86232f24.tar.bz2
troggle-b88b1423328d26081457e9d0bb5f55cf86232f24.zip
fixing bad splay detection
Diffstat (limited to 'core')
-rw-r--r--core/views/survex.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/views/survex.py b/core/views/survex.py
index e91d228..edc3b1f 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -350,6 +350,10 @@ def svx(request, survex_file):
svxblocks = []
try:
svxblocksall = svxfile.survexblock_set.all()
+ svxlength = 0.0
+ for b in svxblocksall:
+ svxlength += b.legslength
+ print(svxlength,b)
except AttributeError: # some survexfiles just *include files and have no blocks themselves
svxblocksall = []
else:
@@ -366,6 +370,7 @@ def svx(request, survex_file):
"warning": warning,
"has_3d": (Path(survexdatasetpath) / Path(survex_file + ".3d")).is_file(),
"title": survex_file,
+ "svxlength": svxlength,
"svxblocks": svxblocks,
"svxincludes": svxincludes,
"difflist": difflist,