Skip to content

Commit aea3c1a

Browse files
committed
Look at all scheduled sessions for a group when deciding to display a cancelled banner. Fixes ietf-tools#2764. Commit ready for merge.
- Legacy-Id: 16604
1 parent d27096f commit aea3c1a

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

ietf/meeting/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,10 @@ def all_meeting_sessions_for_group(self):
968968
else:
969969
return [self]
970970

971+
def all_meeting_sessions_cancelled(self):
972+
states = set([s.status_id for s in self.all_meeting_sessions_for_group()])
973+
return 'canceled' in states and len(states) == 1
974+
971975
def all_meeting_recordings(self):
972976
recordings = [] # These are not sets because we need to preserve relative ordering or redo the ordering work later
973977
sessions = self.all_meeting_sessions_for_group()

ietf/templates/meeting/group_materials.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% endif %}
1919
</td>
2020

21-
{% if session.status_id == 'canceled' %}
21+
{% if session.all_meeting_sessions_cancelled %}
2222
{% if user|has_role:"Secretariat" or user_groups %}
2323
<td colspan="6"><span class="label label-danger">Session cancelled</span></td>
2424
{% else %}

ietf/templates/meeting/group_proceedings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% endif %}
1919
</td>
2020

21-
{% if session.status_id == 'canceled' %}
21+
{% if session.all_meeting_sessions_cancelled %}
2222
<td colspan="3"><span class="label label-danger">Session cancelled</span></td>
2323
{% else %}
2424
<td>

0 commit comments

Comments
 (0)