From 88fc3b15442b737355a7efd6f635a5bbf5b69676 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar <theskumar@users.noreply.github.com> Date: Thu, 28 Jul 2022 15:48:25 +0530 Subject: [PATCH] =?UTF-8?q?Fix=20warning=20for=20django-filter=20->=20?= =?UTF-8?q?=E2=80=9Cfilter=5Fclass=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: https://django-filter.readthedocs.io/en/stable/guide/migration.html#view-attributes-renamed-867 ``` hypha/apply/api/v1/screening/tests/test_views.py::ScreeningStatusViewSetTests::test_staff_can_list_screening_statuses hypha/apply/api/v1/screening/tests/test_views.py::ScreeningStatusViewSetTests::test_staff_can_view_screening_statuses_detail /Users/theskumar/work/hyphaapp/hypha/venv/lib/python3.9/site-packages/django_filters/rest_framework/backends.py:31: MigrationNotice: `ScreeningStatusViewSet.filter_class` attribute should be renamed `filterset_class`. See: https://django-filter.readthedocs.io/en/master/guide/migration.html See: https://django-filter.readthedocs.io/en/master/guide/migration.html filterset_class = self.get_filterset_class(view, queryset) ``` --- hypha/apply/api/v1/screening/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypha/apply/api/v1/screening/views.py b/hypha/apply/api/v1/screening/views.py index 1d7131665..2eb3062ee 100644 --- a/hypha/apply/api/v1/screening/views.py +++ b/hypha/apply/api/v1/screening/views.py @@ -22,7 +22,7 @@ class ScreeningStatusViewSet(viewsets.ReadOnlyModelViewSet): permissions.IsAuthenticated, IsApplyStaffUser, ) filter_backends = (filters.DjangoFilterBackend,) - filter_class = ScreeningStatusFilter + filterset_class = ScreeningStatusFilter pagination_class = None queryset = ScreeningStatus.objects.all() serializer_class = ScreeningStatusListSerializer -- GitLab