forked from gergely/calendar-social
[Bugfix] Fix the ordering of events
They were in SQL order. Now they are ordered by start time.
This commit is contained in:
parent
32c84725a9
commit
26c31bcc04
@ -154,6 +154,7 @@ class GregorianCalendar(CalendarSystem):
|
||||
end_timestamp = start_timestamp + timedelta(days=1)
|
||||
|
||||
events = events.filter(((Event.start_time >= start_timestamp) & (Event.start_time < end_timestamp)) |
|
||||
((Event.end_time >= start_timestamp) & (Event.end_time < end_timestamp)))
|
||||
((Event.end_time >= start_timestamp) & (Event.end_time < end_timestamp))) \
|
||||
.order_by('start_time', 'end_time')
|
||||
|
||||
return events
|
||||
|
Loading…
Reference in New Issue
Block a user