From 4dd6d4498b2c805b0180cd0fb0a8710808afb789 Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 12 May 2020 17:09:36 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20Asset=20filter=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20platform=5F=5Fname=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/api/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/api/asset.py b/apps/assets/api/asset.py index 6eb8ebeaf..4bafe2fc2 100644 --- a/apps/assets/api/asset.py +++ b/apps/assets/api/asset.py @@ -33,7 +33,7 @@ class AssetViewSet(OrgBulkModelViewSet): API endpoint that allows Asset to be viewed or edited. """ model = Asset - filter_fields = ("hostname", "ip", "systemuser__id", "admin_user__id") + filter_fields = ("hostname", "ip", "systemuser__id", "admin_user__id", "platform__name") search_fields = ("hostname", "ip") ordering_fields = ("hostname", "ip", "port", "cpu_cores") serializer_classes = {