From 586b2411cfc7401705e91c23edad0bc0f9777549 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 25 Sep 2012 00:13:58 +0200 Subject: [PATCH] brmbar.Shop.account_list(): Sort accounts alphabetically --- brmbar3/brmbar/Shop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brmbar3/brmbar/Shop.py b/brmbar3/brmbar/Shop.py index 48b9505..57e98dd 100644 --- a/brmbar3/brmbar/Shop.py +++ b/brmbar3/brmbar/Shop.py @@ -104,7 +104,7 @@ class Shop: def account_list(self, acctype): accts = [] with closing(self.db.cursor()) as cur: - cur.execute("SELECT id FROM accounts WHERE acctype = %s", [acctype]) + cur.execute("SELECT id FROM accounts WHERE acctype = %s ORDER BY name ASC", [acctype]) for inventory in cur: accts += [ Account.load(self.db, id = inventory[0]) ] return accts