From 5822c7807ce8fe75d802fc3bff2155f1477a7ede Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 24 Apr 2024 17:01:09 +0200 Subject: [PATCH] fix cas de base --- src/agenda_culturel/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index e31eeda..3ee603f 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -143,7 +143,12 @@ class EventFilter(django_filters.FilterSet): return [] def get_recurrence_filtering(self): if "recurrences" in self.form.cleaned_data: - return dict(self.RECURRENT_CHOICES)[self.form.cleaned_data["recurrences"]] + d = dict(self.RECURRENT_CHOICES) + v = self.form.cleaned_data["recurrences"] + if v in d: + return d[v] + else: + return "" else: return ""