fix error 500

This commit is contained in:
Jean-Marie Favreau 2024-04-20 17:23:02 +02:00
parent 551c919a9f
commit a382b9ce22
1 changed files with 4 additions and 1 deletions

View File

@ -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: