Skip to content

Commit 76404ce

Browse files
committed
Don't show links to individual meeting stats pages when there's no content (meeting 71 and earlier currently has no attendance records).
- Legacy-Id: 14948
1 parent 176022f commit 76404ce

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

ietf/meeting/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ def get_submission_correction_date(self):
171171
def get_schedule_by_name(self, name):
172172
return self.schedule_set.filter(name=name).first()
173173

174+
def get_number(self):
175+
"Return integer meeting number for ietf meetings, rather than strings."
176+
if self.number.isdigit():
177+
return int(self.number)
178+
else:
179+
return None
180+
174181
@property
175182
def sessions_that_can_meet(self):
176183
qs = self.session_set.exclude(status__slug='notmeet').exclude(status__slug='disappr').exclude(status__slug='deleted').exclude(status__slug='apprw')

ietf/templates/stats/meeting_stats_overview.html

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,21 @@ <h3>Data</h3>
123123
<tbody>
124124
{% for meeting, url, count, country in table_data %}
125125
<tr>
126-
<td>{{ meeting.number }}</td>
127-
<td>{{ meeting.date }} </td>
128-
<td><a href="{{ url }}">{{ meeting.city }}</a></td>
129-
<td>{{ country.name }}</td>
130-
<td>{{ country.continent }}</td>
131-
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
126+
{% if meeting.get_number > 71 %}
127+
<td><a href="{{ url }}">{{ meeting.number }}</a></td>
128+
<td>{{ meeting.date }} </td>
129+
<td><a href="{{ url }}">{{ meeting.city }}</a></td>
130+
<td>{{ country.name }}</td>
131+
<td>{{ country.continent }}</td>
132+
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
133+
{% else %}
134+
<td>{{ meeting.number }}</td>
135+
<td>{{ meeting.date }} </td>
136+
<td>{{ meeting.city }}</td>
137+
<td>{{ country.name }}</td>
138+
<td>{{ country.continent }}</td>
139+
<td>{% include "stats/includes/number_with_details_cell.html" %}</td>
140+
{% endif %}
132141
</tr>
133142
{% endfor %}
134143
</tbody>

0 commit comments

Comments
 (0)