From c431e96eaf38d0777b034c9d2dfd5edeaca7f882 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Wed, 21 Aug 2024 10:35:07 +0800 Subject: [PATCH] perf: View asset mini api add domain platform field --- apps/assets/serializers/asset/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/serializers/asset/common.py b/apps/assets/serializers/asset/common.py index 9a6f21a11..2bbc6e451 100644 --- a/apps/assets/serializers/asset/common.py +++ b/apps/assets/serializers/asset/common.py @@ -131,9 +131,9 @@ class AssetSerializer(BulkOrgResourceModelSerializer, ResourceLabelsMixin, Writa class Meta: model = Asset - fields_mini = ['id', 'name', 'address'] - fields_small = fields_mini + ['is_active', 'comment'] fields_fk = ['domain', 'platform'] + fields_mini = ['id', 'name', 'address'] + fields_fk + fields_small = fields_mini + ['is_active', 'comment'] fields_m2m = [ 'nodes', 'labels', 'protocols', 'nodes_display', 'accounts',