diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 66c486d..e0909ae 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -126,7 +126,10 @@ class EventFilter(django_filters.FilterSet): return self.form.cleaned_data["status"] def get_status_names(self): - return [dict(Event.STATUS.choices)[s] for s in self.form.cleaned_data["status"]] + if "status" in self.form.cleaned_data: + return [dict(Event.STATUS.choices)[s] for s in self.form.cleaned_data["status"]] + else: + return [] def is_active(self, only_categories=False): if only_categories: