Skip to content

Commit

Permalink
[fix] Updated django-filter filterset_class syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gbip committed Oct 30, 2023
1 parent e2438de commit 5840e4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rest_framework_gis/filters.py
Expand Up @@ -116,7 +116,7 @@ def __init__(self, *args, **kwargs):

class GeoFilterSet(django_filters.FilterSet):
GEOFILTER_FOR_DBFIELD_DEFAULTS = {
models.GeometryField: {'filter_class': GeometryFilter},
models.GeometryField: {'filterset_class': GeometryFilter},
}

def __new__(cls, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion tests/django_restframework_gis_tests/views.py
Expand Up @@ -208,7 +208,7 @@ class Meta:
class GeojsonLocationContainedInGeometry(generics.ListAPIView):
queryset = Location.objects.all()
serializer_class = LocationGeoSerializer
filter_class = LocationFilter
filterset_class = LocationFilter

filter_backends = (DjangoFilterBackend,)

Expand Down

0 comments on commit 5840e4f

Please sign in to comment.