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

@@ -18,5 +18,5 @@ class GatheredUserViewSet(OrgModelViewSet):
permission_classes = [IsOrgAdmin]
extra_filter_backends = [AssetRelatedByNodeFilterBackend]
filter_fields = ['asset', 'username', 'present', 'asset__ip', 'asset__hostname', 'asset_id']
filterset_fields = ['asset', 'username', 'present', 'asset__ip', 'asset__hostname', 'asset_id']
search_fields = ['username', 'asset__ip', 'asset__hostname']