Browse Source

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

Romain Rigaux 9 years ago
parent
commit
a4cd513
1 changed files with 1 additions and 1 deletions
  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)