From 41e742904ff4cf35abbd885eeb98902a05d3be80 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 23 Nov 2021 17:35:25 +0300 Subject: wqflask: metadata_edits: Sort files from most recent --- wqflask/wqflask/metadata_edits.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py index 21b73cb4..f87914d5 100644 --- a/wqflask/wqflask/metadata_edits.py +++ b/wqflask/wqflask/metadata_edits.py @@ -428,9 +428,15 @@ def list_diffs(): gn_proxy_url=current_app.config.get("GN2_PROXY")) return render_template( "display_files.html", - approved=files.get("approved"), - rejected=files.get("rejected"), - waiting=files.get("waiting")) + approved=sorted(files.get("approved"), + reverse=True, + key=lambda d: d.get("time_stamp")), + rejected=sorted(files.get("rejected"), + reverse=True, + key=lambda d: d.get("time_stamp")), + waiting=sorted(files.get("waiting"), + reverse=True, + key=lambda d: d.get("time_stamp"))) @metadata_edit.route("/diffs/") -- cgit v1.2.3