On prépare les champs (sinon le cache ne marche pas, il utilise to_str)

This commit is contained in:
Jean-Marie Favreau 2024-09-14 23:26:20 +02:00
parent 062864b6e3
commit 6f92cdf3c1

View File

@ -298,6 +298,7 @@ class EventFilter(django_filters.FilterSet):
return self.get_cleaned_data("city") return self.get_cleaned_data("city")
def to_str(self, prefix=''): def to_str(self, prefix=''):
self.form.full_clean()
result = ' '.join([c.name for c in self.get_categories()] + [t for t in self.get_tags()] + [c for c in self.get_cities()]) result = ' '.join([c.name for c in self.get_categories()] + [t for t in self.get_tags()] + [c for c in self.get_cities()])
if len(result) > 0: if len(result) > 0:
result = prefix + result result = prefix + result