fix(resultats): gère convenablement l absence de résultat cassée par #54

pull/55/head
François Poulain 2 years ago
parent 995f067631
commit 210b61b38f

@ -654,6 +654,9 @@ class ScrutinResults(AdminMixin, CSVExportMixin, detail.DetailView):
context['can_split_by'] = self.can_split_by
context['split_by'] = self.verbose_split_by
context['results'] = self.object.get_results(context['split_by'])
context['has_results'] = any(
[p['participation'] for _, _, p in context['results']]
)
return context
def dispatch(self, request, *args, **kwargs):

@ -33,7 +33,7 @@
</div>
</header>
<div class="nice-padding">
{% if results %}
{% if has_results %}
<div class="overflow">
{% for header, listing, participation in results %}
{% if listing %}

Loading…
Cancel
Save