Skip to content

Commit

Permalink
remove extra code
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 29, 2023
1 parent 6a3272d commit 339b2a2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/django_oapif/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 339b2a2

Please sign in to comment.