Skip to content

Commit

Permalink
Merge pull request #4285 from GeotrekCE/mfu-fix-deleted-services
Browse files Browse the repository at this point in the history
filter out deleted services in API response
  • Loading branch information
bruhnild committed Aug 29, 2024
2 parents 6708887 + 0ae8276 commit ad5cca0
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 @@ -8,7 +8,7 @@ CHANGELOG
**Minor fixes**

- Fix swapped plural and singular translations for Annotation Categories (#4032)

- Filter out deleted services in API responses (#4284)

2.109.1 (2024-08-22)
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion geotrek/api/v2/views/trekking.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def retrieve(self, request, pk=None, format=None):
class ServiceViewSet(api_viewsets.GeotrekGeometricViewset):
filter_backends = api_viewsets.GeotrekGeometricViewset.filter_backends + (api_filters.NearbyContentFilter, api_filters.UpdateOrCreateDateFilter, api_filters.GeotrekServiceFilter)
serializer_class = api_serializers.ServiceSerializer
queryset = trekking_models.Service.objects.all() \
queryset = trekking_models.Service.objects.existing() \
.select_related('topo_object', 'type', ) \
.prefetch_related('topo_object__aggregations',
Prefetch('attachments',
Expand Down

0 comments on commit ad5cca0

Please sign in to comment.