Skip to content
Snippets Groups Projects
Verified Commit bdcc7413 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Make order of filters more reasonable.

parent 32de3953
No related branches found
No related tags found
No related merge requests found
......@@ -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. """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment