summaryrefslogtreecommitdiffstats
path: root/core/views/statistics.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-10-09 23:50:32 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-10-09 23:50:32 +0300
commit861980a8e9f9d58e6327e8e1a98f7f8c5fec7048 (patch)
treeb13c4c6a9786f05d0540b76a1855cbde7a950bcd /core/views/statistics.py
parent3c31c333f2776bd5afb8b84d7cb07eda667affae (diff)
downloadtroggle-861980a8e9f9d58e6327e8e1a98f7f8c5fec7048.tar.gz
troggle-861980a8e9f9d58e6327e8e1a98f7f8c5fec7048.tar.bz2
troggle-861980a8e9f9d58e6327e8e1a98f7f8c5fec7048.zip
More fixes to name resolution checking
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r--core/views/statistics.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py
index fb26254..14205b7 100644
--- a/core/views/statistics.py
+++ b/core/views/statistics.py
@@ -181,12 +181,14 @@ def aliases(request, year):
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
persons = Person.objects.all()
- aliasdict = GetPersonExpeditionNameLookup(expo)
- res = aliasdict
- # invert
+ aliases = GetPersonExpeditionNameLookup(expo)
+
+ aliasdict = {key: val for key, val in sorted(aliases.items(), key = lambda ele: ele[0])}
+
+ aliasdict={}
+ for i in sorted(aliases):
+ aliasdict[i]=aliases[i]
invert ={}
- for p in res:
- invert[res[p]].append(p)
return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict, 'invert': invert,'personexpeditions': personexpeditions, 'persons': persons})