From 7f21e6cb6ede6d7fcc1b82e14d22040466973356 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Mon, 13 Feb 2023 14:44:17 +0800 Subject: [PATCH] perf: terminal command ordering (#9517) Co-authored-by: feng <1304903146@qq.com> --- apps/terminal/api/session/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/terminal/api/session/command.py b/apps/terminal/api/session/command.py index 86d56b026..b855181b8 100644 --- a/apps/terminal/api/session/command.py +++ b/apps/terminal/api/session/command.py @@ -103,9 +103,9 @@ class CommandViewSet(JMSBulkModelViewSet): command_store = get_command_storage() serializer_class = SessionCommandSerializer filterset_class = CommandFilter - search_fields = ('input',) model = Command - ordering_fields = ('timestamp',) + search_fields = ('input',) + ordering_fields = ('timestamp', 'risk_level') def merge_all_storage_list(self, request, *args, **kwargs): merged_commands = []