Skip to content

Commit

Permalink
fix: Maintenance appears several times on some zoning filters #3881
Browse files Browse the repository at this point in the history
  • Loading branch information
juggler31 committed Jan 8, 2024
1 parent 67667a9 commit 41e35fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------------
Expand Down
2 changes: 1 addition & 1 deletion geotrek/maintenance/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 41e35fe

Please sign in to comment.