diff --git a/docs/changelog.rst b/docs/changelog.rst index ca56375ed1..93b4aafbe3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -32,7 +32,7 @@ CHANGELOG **Bug fixes** - Extract all geometry types in views `v_outdoor_sites` and `v_outdoor_courses` (#3603) - +- Maintenance appears several times on some zoning filters (#3881) 2.101.4 (2023-11-15) ------------------------ diff --git a/geotrek/maintenance/filters.py b/geotrek/maintenance/filters.py index 06d1b8afb4..6ad9c6451c 100644 --- a/geotrek/maintenance/filters.py +++ b/geotrek/maintenance/filters.py @@ -112,7 +112,7 @@ def filter(self, qs, values): restricted_areas = RestrictedArea.objects.filter(area_type__in=values) if not restricted_areas and values: return qs.none() - return super().filter(qs, list(restricted_areas)) + return super().filter(qs, list(restricted_areas)).distinct() class AltimetryInterventionFilterSet(AltimetryPointFilterSet):