Skip to content

Commit 0d33a8d

Browse files
committed
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). Commit ready for merge.
- Legacy-Id: 19168
1 parent 058f007 commit 0d33a8d

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

ietf/meeting/helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def preprocess_assignments_for_agenda(assignments_queryset, meeting, extra_prefe
194194
for a in assignments:
195195
if a.session:
196196
a.session.historic_group = None
197+
a.session.order_number = None
197198

198199
if a.session.group and a.session.group not in groups:
199200
groups.append(a.session.group)
@@ -216,6 +217,9 @@ def preprocess_assignments_for_agenda(assignments_queryset, meeting, extra_prefe
216217
if a.session.historic_group.parent_id:
217218
parent_id_set.add(a.session.historic_group.parent_id)
218219

220+
l = sessions_for_groups.get((a.session.group, a.session.type_id), [])
221+
a.session.order_number = l.index(a) + 1 if a in l else 0
222+
219223
parents = Group.objects.filter(pk__in=parent_id_set)
220224
parent_replacements = find_history_replacements_active_at(parents, meeting_time)
221225

ietf/meeting/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,8 @@ def session_details(request, num, acronym):
23052305
qs = [p for p in qs if p.document.get_state_slug(p.document.type_id)!='deleted']
23062306
session.type_counter.update([p.document.type.slug for p in qs])
23072307

2308+
session.order_number = session.order_in_meeting()
2309+
23082310
# we somewhat arbitrarily use the group of the last session we get from
23092311
# get_sessions() above when checking can_manage_session_materials()
23102312
can_manage = can_manage_session_materials(request.user, session.group, session)

0 commit comments

Comments
 (0)