perf: asset connectivity ordering (#9343)

Co-authored-by: feng <1304903146@qq.com>
pull/9346/head
fit2bot 2023-01-23 18:20:17 +08:00 committed by GitHub
parent 37e471e950
commit 4409809106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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),