Skip to content
Snippets Groups Projects
Commit e5360a71 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'master' into fix/migrations-json

parents 89615ef6 a35c264a
No related branches found
No related tags found
1 merge request!186Fix migrations (replace JSON field etc.)
Pipeline #10397 passed
......@@ -168,8 +168,9 @@ def _generate_dicts_for_lesson_periods(
"""Generate a list of dicts for use with ``RegisterObjectTable``."""
if not holiday_days:
holiday_days = []
date_start = lesson_periods.first().lesson.validity.date_start
date_end = lesson_periods.last().lesson.validity.date_end
lesson_periods = list(lesson_periods)
date_start = lesson_periods[0].lesson.validity.date_start
date_end = lesson_periods[-1].lesson.validity.date_end
if (
filter_dict["filter_date"]
and filter_dict.get("date_start") > date_start
......@@ -288,6 +289,7 @@ def _generate_dicts_for_events_and_extra_lessons(
period = f"{register_object.period.period}."
period_sort = register_object.period.period
else:
register_object.annotate_day(register_object.date_end)
day = (
f"{date_format(register_object.date_start)}"
f"{date_format(register_object.date_end)}"
......
This diff is collapsed.
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