aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-11-23 17:35:25 +0300
committerBonfaceKilz2021-11-23 17:44:24 +0300
commit41e742904ff4cf35abbd885eeb98902a05d3be80 (patch)
treec2cebab18813fae62f4732ab37f1fba958c0edbd
parent66960bdbd7cd313ebe5a7136568b7389dc7d7fed (diff)
downloadgenenetwork2-41e742904ff4cf35abbd885eeb98902a05d3be80.tar.gz
wqflask: metadata_edits: Sort files from most recent
-rw-r--r--wqflask/wqflask/metadata_edits.py12
1 files 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/<name>")