openwisp / django-rest-framework-gis

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
http://openwisp.org
MIT License
1.07k stars 200 forks source link

Fix : django-filter looks for 'filterset_class' attribute now #288

Closed gbip closed 10 months ago

gbip commented 10 months ago

The test tests.django_restframework_gis_tests.test_filters.TestRestFrameworkGisFilters.test_GeometryField_filtering was failing. After checking my database logs, it seemed that postgres was not receiving the right query, as the where clause was missing.

I looked a bit into the django-filter setup and it needed an update.

The fix was to rename the attribute filter_class to filterset_class, as per the doc.