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

Merge branch...

Merge branch '184-lessons-without-any-groups-are-displayed-as-cancelled-if-there-is-any-event-in-the-same-time' into 'master'

Resolve "Lessons without any groups are displayed as cancelled if there is any event in the same time period"

Closes #184

See merge request !277
parents 89b4b693 c26d20a6
No related branches found
No related tags found
1 merge request!277Resolve "Lessons without any groups are displayed as cancelled if there is any event in the same time period"
Pipeline #96482 failed
Pipeline: AlekSIS

#96488

    ......@@ -15,6 +15,7 @@ Fixed
    * The date picker did not work with some date formats.
    * Send notifications for changes done via daily lessons page.
    * Lessons with same subject and groups but different teachers were not considered equal.
    * Lessons without any groups were displayed as cancelled if there was an event in the same time period.
    `2.4.1`_ - 2022-08-31
    ---------------------
    ......
    ......@@ -631,6 +631,10 @@ class LessonPeriod(WeekAnnotationMixin, TeacherPropertiesMixin, ExtensibleModel)
    else:
    groups_lesson_period = set(self.lesson.groups.all())
    # The lesson period isn't replacable if the lesson has no groups at all
    if not groups_lesson_period:
    return False
    # This lesson period is replaced by an event ...
    # ... if all groups of this lesson period are a part of the event ...
    if groups_lesson_period.issubset(groups_of_event):
    ......
    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