fix(assets): 修改 AssetViewSet.filter_fields

This commit is contained in:
xinwen 2020-10-23 15:14:15 +08:00 committed by 老广
parent fd7f379b10
commit 8404db8cef

View File

@ -32,7 +32,7 @@ class AssetViewSet(FilterAssetByNodeMixin, OrgBulkModelViewSet):
model = Asset
filter_fields = (
"hostname", "ip", "systemuser__id", "admin_user__id", "platform__base",
"is_active", 'ip'
"is_active"
)
search_fields = ("hostname", "ip")
ordering_fields = ("hostname", "ip", "port", "cpu_cores")