perf: terminal command ordering (#9517)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-02-13 14:44:17 +08:00
committed by GitHub
parent e88cb71d3c
commit 7f21e6cb6e

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