perf: terminal command ordering (#9517)

Co-authored-by: feng <1304903146@qq.com>
pull/9520/head
fit2bot 2023-02-13 14:44:17 +08:00 committed by GitHub
parent e88cb71d3c
commit 7f21e6cb6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 = []