diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-06-30 12:15:09 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-06-30 12:15:09 +0300 |
commit | 6c962c0132455bf4bff329856a790d83b935848f (patch) | |
tree | d7e59620d9c955c99e6f3a77169a41fc31047bab /core/views/statistics.py | |
parent | 8d901efdfcb81d1c4c04faa7ff6b2946fc7afe30 (diff) | |
download | troggle-6c962c0132455bf4bff329856a790d83b935848f.tar.gz troggle-6c962c0132455bf4bff329856a790d83b935848f.tar.bz2 troggle-6c962c0132455bf4bff329856a790d83b935848f.zip |
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r-- | core/views/statistics.py | 7 |
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})) |