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