From 68b9c014c766f72d5d0fe4015bca0087d012fed5 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Fri, 3 Mar 2017 23:14:54 +0100
Subject: [PATCH] Sort todomails by name (in table) /close #21

---
 server.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.py b/server.py
index 08dcecd..bb0d33c 100755
--- a/server.py
+++ b/server.py
@@ -1109,7 +1109,7 @@ def delete_error(error_id):
 @app.route("/todomails/list")
 @login_required
 def list_todomails():
-    todomails = TodoMail.query.all()
+    todomails = sorted(TodoMail.query.all(), key=lambda tm: tm.name)
     todomails_table = TodoMailsTable(todomails)
     return render_template("todomails-list.html", todomails=todomails, todomails_table=todomails_table)
 
-- 
GitLab