On utilise la liste déjà disponible

This commit is contained in:
Jean-Marie Favreau 2023-11-07 18:08:32 +01:00
parent 52983d9840
commit 8f02abe9db

View File

@ -178,7 +178,7 @@ class EventFilter(django_filters.FilterSet):
def build_get_url(get, first = "?"): def build_get_url(get, first = "?"):
result = "" result = ""
for p in get: for p in get:
if p in ["category", "tags"]: if p in EventFilter.Meta.fields:
for v in get.getlist(p): for v in get.getlist(p):
result += first if len(result) == 0 else "&" result += first if len(result) == 0 else "&"
result += str(p) + "=" + str(v) result += str(p) + "=" + str(v)