fix: use a single Meeting instance for all assignments in agenda views (#4877)
This commit is contained in:
parent
f0966e43f5
commit
5a1fc4c2ab
|
@ -119,6 +119,11 @@ def preprocess_assignments_for_agenda(assignments_queryset, meeting, extra_prefe
|
||||||
groups = [ ]
|
groups = [ ]
|
||||||
for a in assignments:
|
for a in assignments:
|
||||||
if a.session:
|
if a.session:
|
||||||
|
# Ensure that all Sessions refer to the same Meeting instance so they can share the
|
||||||
|
# _groups_at_the_time() cache. The Sessions should all belong to the same meeting, but
|
||||||
|
# check before blindly assigning to meeting just in case.
|
||||||
|
if a.session.meeting.pk == meeting.pk:
|
||||||
|
a.session.meeting = meeting
|
||||||
a.session.order_number = None
|
a.session.order_number = None
|
||||||
|
|
||||||
if a.session.group and a.session.group not in groups:
|
if a.session.group and a.session.group not in groups:
|
||||||
|
|
Loading…
Reference in a new issue