Allow to disable filter support for meta properties (#2901)

This commit is contained in:
Raphael Michel
2022-11-16 17:12:37 +01:00
committed by GitHub
parent 49097037da
commit a0e5717f7d
7 changed files with 37 additions and 6 deletions

View File

@@ -205,7 +205,7 @@ class OrganizerDetail(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixin
ctx = super().get_context_data(**kwargs)
ctx['filter_form'] = self.filter_form
ctx['meta_fields'] = [
self.filter_form['meta_{}'.format(p.name)] for p in self.organizer.meta_properties.all()
self.filter_form['meta_{}'.format(p.name)] for p in self.organizer.meta_properties.filter(filter_allowed=True)
]
return ctx