From 870dfb5129be3f5c36c7002a24582f1cd89df6da Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 10 Oct 2025 22:18:14 +0300 Subject: [PATCH] fix count of expos --- core/views/statistics.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/views/statistics.py b/core/views/statistics.py index 480fb48..a714966 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -109,11 +109,14 @@ def stats(request): This is only underground survey legs, but includes ARGE as well as Expo survex files. """ statsDict = {} - statsDict["expoCount"] = f"{Expedition.objects.count():,}" statsDict["caveCount"] = f"{Cave.objects.count():,}" statsDict["personCount"] = f"{Person.objects.count():,}" statsDict["walletsCount"] = f"{Wallet.objects.count():,}" statsDict["logbookEntryCount"] = f"{LogbookEntry.objects.count():,}" + + #statsDict["expoCount"] = f"{Expedition.objects.count():,}" # incorrect as no expo in 76, 2020,21 + n = int(current_expo()) - 1975 - 3 + statsDict["expoCount"] = f"{n:,}" # incorrect as no expo in 76, 2020,21 expos = Expedition.objects.all() legsbyexpo, addupsurvexlegs, addupsurvexlength = legs_by_expo(expos)