Merged in [19168] from rjsparks@nostrum.com:
Revert the removal of the decoration of session with order_number made in r19074. The attribute is used in the templated URLs associated with Rooms (such as for the Meetecho session URL).
- Legacy-Id: 19172
Note: SVN reference [19168] has been migrated to Git commit 0d33a8dde2
This commit is contained in:
commit
6599881aff
|
@ -194,6 +194,7 @@ def preprocess_assignments_for_agenda(assignments_queryset, meeting, extra_prefe
|
|||
for a in assignments:
|
||||
if a.session:
|
||||
a.session.historic_group = None
|
||||
a.session.order_number = None
|
||||
|
||||
if a.session.group and a.session.group not in groups:
|
||||
groups.append(a.session.group)
|
||||
|
@ -216,6 +217,9 @@ def preprocess_assignments_for_agenda(assignments_queryset, meeting, extra_prefe
|
|||
if a.session.historic_group.parent_id:
|
||||
parent_id_set.add(a.session.historic_group.parent_id)
|
||||
|
||||
l = sessions_for_groups.get((a.session.group, a.session.type_id), [])
|
||||
a.session.order_number = l.index(a) + 1 if a in l else 0
|
||||
|
||||
parents = Group.objects.filter(pk__in=parent_id_set)
|
||||
parent_replacements = find_history_replacements_active_at(parents, meeting_time)
|
||||
|
||||
|
|
|
@ -2305,6 +2305,8 @@ def session_details(request, num, acronym):
|
|||
qs = [p for p in qs if p.document.get_state_slug(p.document.type_id)!='deleted']
|
||||
session.type_counter.update([p.document.type.slug for p in qs])
|
||||
|
||||
session.order_number = session.order_in_meeting()
|
||||
|
||||
# we somewhat arbitrarily use the group of the last session we get from
|
||||
# get_sessions() above when checking can_manage_session_materials()
|
||||
can_manage = can_manage_session_materials(request.user, session.group, session)
|
||||
|
|
Loading…
Reference in a new issue