Compatibility with django-filter<2.0.0
@@ -92,6 +92,7 @@ class ProjectViewSet(UserSelectViewSet):
admin_serializer_class = ProjectAdminSerializer
model = Project
pagination_class = api_utils.ProjectPagination
+ filter_fields = ('slug',) # django-filter<2.0.0
filterset_fields = ('slug',)
@decorators.detail_route()
@@ -234,6 +235,7 @@ class VersionViewSet(UserSelectViewSet):
serializer_class = VersionSerializer
admin_serializer_class = VersionAdminSerializer
model = Version
+ filter_fields = ('active', 'project__slug',) # django-filter<2.0.0
filterset_fields = ('active', 'project__slug',)
@@ -243,6 +245,7 @@ class BuildViewSetBase(UserSelectViewSet):
serializer_class = BuildSerializer
admin_serializer_class = BuildAdminSerializer
model = Build
+ filter_fields = ('project__slug', 'commit') # django-filter<2.0.0
filterset_fields = ('project__slug', 'commit')
