Skip to content

Commit

Permalink
Sort the documents in the agenda, minutes, bluesheets section of the …
Browse files Browse the repository at this point in the history
…session_details view. Fixes #2759. Commit ready for merge.

 - Legacy-Id: 16593
  • Loading branch information
rjsparks committed Jul 26, 2019
1 parent c6c086b commit f2dd064
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ietf/meeting/views.py
Expand Up @@ -1089,7 +1089,8 @@ def session_details(request, num, acronym ):
else:
session.time = session.status.name

session.filtered_artifacts = session.sessionpresentation_set.filter(document__type__slug__in=['agenda','minutes','bluesheets'])
session.filtered_artifacts = list(session.sessionpresentation_set.filter(document__type__slug__in=['agenda','minutes','bluesheets']))
session.filtered_artifacts.sort(key=lambda d:['agenda','minutes','bluesheets'].index(d.document.type.slug))
session.filtered_slides = session.sessionpresentation_set.filter(document__type__slug='slides').order_by('order')
session.filtered_drafts = session.sessionpresentation_set.filter(document__type__slug='draft')
# TODO FIXME Deleted materials shouldn't be in the sessionpresentation_set
Expand Down

0 comments on commit f2dd064

Please sign in to comment.