perf: 优化资产列表支持通过 创建日期 进行排序

pull/12287/head
Bai 2023-12-08 14:38:31 +08:00 committed by Bryan
parent 79b5dff210
commit 47cb6b1ec0
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class AssetViewSet(SuggestionMixin, NodeFilterMixin, OrgBulkModelViewSet):
model = Asset
filterset_class = AssetFilterSet
search_fields = ("name", "address", "comment")
ordering_fields = ('name', 'connectivity', 'platform', 'date_updated')
ordering_fields = ('name', 'connectivity', 'platform', 'date_updated', 'date_created')
serializer_classes = (
("default", serializers.AssetSerializer),
("platform", serializers.PlatformSerializer),