From 44098091060cf0484cf651c23ce8f450d26d6c17 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Mon, 23 Jan 2023 18:20:17 +0800 Subject: [PATCH] perf: asset connectivity ordering (#9343) Co-authored-by: feng <1304903146@qq.com> --- apps/assets/api/asset/asset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/api/asset/asset.py b/apps/assets/api/asset/asset.py index 08c877bcb..c0dda34c7 100644 --- a/apps/assets/api/asset/asset.py +++ b/apps/assets/api/asset/asset.py @@ -65,8 +65,8 @@ class AssetViewSet(SuggestionMixin, NodeFilterMixin, OrgBulkModelViewSet): model = Asset filterset_class = AssetFilterSet search_fields = ("name", "address") - ordering_fields = ("name", "address") - ordering = ("name",) + ordering_fields = ("name", "address", "connectivity") + ordering = ("name", "connectivity") serializer_classes = ( ("default", serializers.AssetSerializer), ("platform", serializers.PlatformSerializer),