fixing bad splay detection

This commit is contained in:
2023-03-12 00:35:37 +00:00
parent 870b290726
commit b88b142332
6 changed files with 30 additions and 29 deletions

View File

@@ -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,