[FIW] website_event_track: fix location order

Without this commit, each refresh of the agenda, will randomly show the locs.

-- Fix done in prod for oxp

closes odoo/odoo#29300
This commit is contained in:
Jeremy Kersten
2018-12-05 08:54:19 +00:00
parent ba7454eb08
commit 8a0e42e8f4
@@ -64,6 +64,7 @@ class WebsiteEventTrackController(http.Controller):
locations[location][-1][3] -= 1
locations[location].append([track, start_date, end_date, 1])
dates[-1][1][location] = locations[location][-1]
locations = collections.OrderedDict(sorted(locations.items(), key=lambda t: t[0].id if t[0] else 0))
return {
'locations': locations,
'dates': dates