summaryrefslogtreecommitdiffstats
path: root/core/views/statistics.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r--core/views/statistics.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py
index 8bd7072..30fc1b5 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -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}))