Changes required to upgrade to django-filter 2.0
@@ -92,7 +92,7 @@ class ProjectViewSet(UserSelectViewSet):
admin_serializer_class = ProjectAdminSerializer
model = Project
pagination_class = api_utils.ProjectPagination
- filter_fields = ('slug',)
+ filterset_fields = ('slug',)
@decorators.detail_route()
def valid_versions(self, request, **kwargs):
@@ -234,7 +234,7 @@ class VersionViewSet(UserSelectViewSet):
serializer_class = VersionSerializer
admin_serializer_class = VersionAdminSerializer
model = Version
- filter_fields = ('active', 'project__slug',)
+ filterset_fields = ('active', 'project__slug',)
class BuildViewSetBase(UserSelectViewSet):
@@ -243,7 +243,7 @@ class BuildViewSetBase(UserSelectViewSet):
serializer_class = BuildSerializer
admin_serializer_class = BuildAdminSerializer
model = Build
- filter_fields = ('project__slug', 'commit')
+ filterset_fields = ('project__slug', 'commit')
class BuildViewSet(SettingsOverrideObject):
