From bdcc7413d55fcbf975fe91eaaf30dec5cf9d2d3e Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Sun, 27 Oct 2019 21:48:35 +0100 Subject: [PATCH] Make order of filters more reasonable. --- biscuit/apps/chronos/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biscuit/apps/chronos/models.py b/biscuit/apps/chronos/models.py index 0e054fb9..4040d4e1 100644 --- a/biscuit/apps/chronos/models.py +++ b/biscuit/apps/chronos/models.py @@ -43,7 +43,7 @@ class LessonPeriodQuerySet(models.QuerySet): def within_dates(self, start: date, end: date): """ Filter for all lessons within a date range. """ - return self.filter(lesson__date_start__gte=start, lesson__date_end__lte=end) + return self.filter(lesson__date_start__lte=start, lesson__date_end__gte=end) def on_day(self, day: date): """ Filter for all lessons on a certain day. """ -- GitLab