From 35e9eb558d0ef7fb34d8ed7140a684cdce0998cf Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sun, 12 Mar 2023 01:09:17 +0000 Subject: Identified survey length discrepencies --- core/views/scans.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/views/scans.py') diff --git a/core/views/scans.py b/core/views/scans.py index 0e49a8c..7f9d8c7 100644 --- a/core/views/scans.py +++ b/core/views/scans.py @@ -195,6 +195,10 @@ def walletslistyear(request, year): manywallets = ticksyearwallet(year) expeditions = Expedition.objects.all() #bad Django style expedition = expeditions.filter(year=year) + length_ug = 0.0 + for w in manywallets: + for sb in w.survexblock_set.all(): + length_ug += sb.legslength print("--") return render( request, @@ -205,6 +209,7 @@ def walletslistyear(request, year): "year": year, "expeditions": expeditions, "expedition": expedition, + "length_ug": length_ug, }, ) -- cgit v1.2.3