diff options
author | Frederick Muriuki Muriithi | 2023-07-11 15:35:31 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-07-11 15:35:31 +0300 |
commit | 29056b6b137d5005683a9a55a12a082f6d5ee835 (patch) | |
tree | 629183d35bc459121adfbdc175ead96df007d60e | |
parent | e641d9082d77b93f6d492994e2edc63fabb5b50c (diff) | |
download | genenetwork2-29056b6b137d5005683a9a55a12a082f6d5ee835.tar.gz |
BugFix: Fix the sorting key functions
Update the sort-key functions to use the correct dictionary keys to
retrieve the comparison value for the sort.
-rw-r--r-- | wqflask/wqflask/metadata_edits.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py index 3c996ce3..8f0166e5 100644 --- a/wqflask/wqflask/metadata_edits.py +++ b/wqflask/wqflask/metadata_edits.py @@ -557,17 +557,17 @@ def list_diffs(): return render_template( "display_files.html", approved=sorted( - org_diffs.get("approved"), + org_diffs["approved"], reverse=True, - key=lambda d: d.get("time_stamp")), + key=lambda d: d["meta"]["time_stamp"]), rejected=sorted( - org_diffs.get("rejected"), + org_diffs["rejected"], reverse=True, - key=lambda d: d.get("time_stamp")), + key=lambda d: d["meta"]["time_stamp"]), waiting=sorted( - org_diffs.get("waiting"), + org_diffs["waiting"], reverse=True, - key=lambda d: d.get("time_stamp"))) + key=lambda d: d["meta"]["time_stamp"])) return accessible_diffs.either(__handle_error__, __success__) |