Skip to content
Snippets Groups Projects
Verified Commit c617b677 authored by magicfelix's avatar magicfelix
Browse files

Sort supervisions by period

parent 1999f0f9
No related branches found
No related tags found
1 merge request!287Sort supervisions by period
Pipeline #101827 passed with warnings
......@@ -358,7 +358,11 @@ def supervisions_day(
wanted_day = TimePeriod.get_next_relevant_day(timezone.now().date(), datetime.now().time())
# Get supervisions
supervisions = Supervision.objects.on_day(wanted_day).filter_by_weekday(wanted_day.weekday())
supervisions = (
Supervision.objects.on_day(wanted_day)
.filter_by_weekday(wanted_day.weekday())
.order_by("break_item__before_period__period")
)
# Get filter
supervisions_filter = SupervisionFilter(
......
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