Преглед изворни кода

HUE-3876 [editor] Sometimes query history is ordered weirdly

Romain Rigaux пре 9 година
родитељ
комит
a4cd513
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      desktop/libs/notebook/src/notebook/api.py

+ 1 - 1
desktop/libs/notebook/src/notebook/api.py

@@ -375,7 +375,7 @@ def get_history(request):
       })
     else:
       LOG.error('Incomplete History Notebook: %s' % notebook)
-  response['history'] = history
+  response['history'] = sorted(history, key=lambda row: row['data']['lastExecuted'], reverse=True)
   response['message'] = _('History fetched')
 
   return JsonResponse(response)