From 32c84725a90a144d683147a00287ceb3a316c5d0 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 2 Jul 2018 16:51:37 +0200 Subject: [PATCH] [Bugfix] Fix day-event fetching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It returned today’s events regardless of the day. --- calsocial/calendar_system/gregorian.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calsocial/calendar_system/gregorian.py b/calsocial/calendar_system/gregorian.py index 9f67373..061fdbc 100644 --- a/calsocial/calendar_system/gregorian.py +++ b/calsocial/calendar_system/gregorian.py @@ -150,7 +150,7 @@ class GregorianCalendar(CalendarSystem): if user: events = events.filter(Event.user == user) - start_timestamp = self.timestamp.replace(hour=0, minute=0, second=0, microsecond=0) + start_timestamp = date.replace(hour=0, minute=0, second=0, microsecond=0) end_timestamp = start_timestamp + timedelta(days=1) events = events.filter(((Event.start_time >= start_timestamp) & (Event.start_time < end_timestamp)) |