diff --git a/georiviere/portal/serializers/map.py b/georiviere/portal/serializers/map.py index 513733ef..8cb63488 100644 --- a/georiviere/portal/serializers/map.py +++ b/georiviere/portal/serializers/map.py @@ -31,8 +31,8 @@ class Meta: def get_is_searchable(self, obj): if obj.layer_type.split('-')[0] in ['pois', 'streams', 'contributions', 'sensitivities']: - return False - return True + return True + return False def get_options(self, obj): return {'style': obj.style if obj.style else None} diff --git a/georiviere/portal/views/contribution.py b/georiviere/portal/views/contribution.py index 84cfb27b..3682d5cd 100644 --- a/georiviere/portal/views/contribution.py +++ b/georiviere/portal/views/contribution.py @@ -43,7 +43,8 @@ class ContributionViewSet(mixins.CreateModelMixin, mixins.RetrieveModelMixin, mi pagination_class = LimitOffsetPagination renderer_classes = [CamelCaseJSONRenderer, GeoJSONRenderer, ] filter_backends = [filters.OrderingFilter, filters.SearchFilter] - search_fields = ['category', 'category__type'] + search_fields = ['potential_damage__type', 'fauna_flora__type', 'quality__type', 'quantity__type', + 'landscape_element__type'] @action(detail=False, url_name="json_schema", methods=['get'], renderer_classes=[renderers.JSONRenderer],