From 339b2a2a3c0cca24e46d7a2254f3904977382674 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 29 Sep 2023 09:32:16 +0200 Subject: [PATCH] remove extra code --- src/django_oapif/decorators.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/django_oapif/decorators.py b/src/django_oapif/decorators.py index 0eb762f6..a0027818 100644 --- a/src/django_oapif/decorators.py +++ b/src/django_oapif/decorators.py @@ -44,12 +44,6 @@ def inner(Model): 1 for viewsets for models without (aka 'non-geometric features'). """ - _viewset_oapif_geom_lookup = ( - "geom" # one day this will be retrieved automatically from the serializer - ) - if not geom_field: - _viewset_oapif_geom_lookup = None - if geom_db_serializer and geom_field: class AutoSerializer(GeoFeatureModelSerializer): @@ -78,7 +72,7 @@ class Viewset(OAPIFDescribeModelViewSetMixin, viewsets.ModelViewSet): oapif_description = Model.__doc__ # (one day this will be retrieved automatically from the serializer) - oapif_geom_lookup = _viewset_oapif_geom_lookup + oapif_geom_lookup = geom_field filter_backends = [BboxFilterBackend] # Allowing '.' and '-' in urls