perf(api): filter_fields被filterset_fields取代

https://django-filter.readthedocs.io/en/stable/guide/migration.html
This commit is contained in:
ibuler
2021-01-07 10:53:10 +08:00
committed by Jiangjie.Bai
parent ff4748f9f4
commit e7a3c5a822
33 changed files with 88 additions and 85 deletions

View File

@@ -21,7 +21,7 @@ class UserGroupGrantedApplicationsApi(CommonApiMixin, ListAPIView):
permission_classes = (IsOrgAdminOrAppUser,)
serializer_class = serializers.ApplicationGrantedSerializer
only_fields = serializers.ApplicationGrantedSerializer.Meta.only_fields
filter_fields = ['id', 'name', 'category', 'type', 'comment']
filterset_fields = ['id', 'name', 'category', 'type', 'comment']
search_fields = ['name', 'comment']
def get_queryset(self):