2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 11:28:23 +00:00

correct totals without non-expo surveys

This commit is contained in:
2025-06-30 12:15:09 +03:00
parent 8d901efdfc
commit 6c962c0132
3 changed files with 8 additions and 6 deletions

View File

@@ -26,9 +26,10 @@ def legs_by_expo(expos):
survexblocks = expedition.survexblock_set.all()
legsyear = 0
survexleglength = 0.0
for survexblock in survexblocks:
survexleglength += survexblock.legslength
legsyear += int(survexblock.legsall)
for sb in survexblocks:
if not sb.foreigners:
survexleglength += sb.legslength
legsyear += int(sb.legsall)
addupsurvexlength += survexleglength
addupsurvexlegs += legsyear
legsbyexpo.append((expedition, {"nsurvexlegs": legsyear, "survexleglength": survexleglength}))