forked from expo/troggle
Inherit *team to anonymous survex blocks
This commit is contained in:
@@ -148,9 +148,7 @@ def person(request, first_name='', last_name='', ):
|
||||
|
||||
|
||||
def get_person_chronology(personexpedition):
|
||||
'''Horrible bug here when there is more than one survex block per day, it duplicates the entry but gets it wrong
|
||||
Fortunately this is just the display on this page which is wroing, no bad calculations get into the database.
|
||||
|
||||
'''
|
||||
This is just a nasty convoluted way of trying the make the template do more work than it is sensible to ask it to do.
|
||||
Rewrite more simply with the login in the python, not in Django template language (you bastard Curtis).
|
||||
'''
|
||||
@@ -160,8 +158,9 @@ def get_person_chronology(personexpedition):
|
||||
a.setdefault("persontrips", [ ]).append(persontrip)
|
||||
|
||||
for personrole in personexpedition.survexpersonrole_set.all():
|
||||
a = res.setdefault(personrole.survexblock.date, { })
|
||||
a.setdefault("personroles", [ ]).append(personrole.survexblock)
|
||||
if personrole.survexblock.date: # avoid bad data from another bug
|
||||
a = res.setdefault(personrole.survexblock.date, { })
|
||||
a.setdefault("personroles", [ ]).append(personrole.survexblock)
|
||||
|
||||
# build up the tables
|
||||
rdates = sorted(list(res.keys()))
|
||||
|
||||
Reference in New Issue
Block a user