From 9fa93fdd15bc60f597ab69ef08fb0354207bc156 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Sat, 9 Mar 2019 18:43:58 +0000 Subject: [PATCH] Fix person chronology to get the date from te logbook entry --- core/views_logbooks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/views_logbooks.py b/core/views_logbooks.py index 0a90d7e..ffd1243 100644 --- a/core/views_logbooks.py +++ b/core/views_logbooks.py @@ -75,7 +75,6 @@ def expedition(request, expeditionname): prow.append(pcell) personexpeditiondays.append({"personexpedition":personexpedition, "personrow":prow}) - message = "" if "reload" in request.GET: LoadLogbookForExpedition(this_expedition) return render_with_context(request,'expedition.html', {'expedition': this_expedition, 'expeditions':expeditions, 'personexpeditiondays':personexpeditiondays, 'settings':settings, 'dateditems': dateditems }) @@ -109,7 +108,7 @@ def person(request, first_name='', last_name='', ): def GetPersonChronology(personexpedition): res = { } for persontrip in personexpedition.persontrip_set.all(): - a = res.setdefault(persontrip.date, { }) + a = res.setdefault(persontrip.logbook_entry.date, { }) a.setdefault("persontrips", [ ]).append(persontrip) for personrole in personexpedition.survexpersonrole_set.all():