mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 13:24:01 +02:00
brmbar.Shop.account_list(): Sort accounts alphabetically
This commit is contained in:
parent
0645e6c9b0
commit
586b2411cf
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ class Shop:
|
||||||
def account_list(self, acctype):
|
def account_list(self, acctype):
|
||||||
accts = []
|
accts = []
|
||||||
with closing(self.db.cursor()) as cur:
|
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:
|
for inventory in cur:
|
||||||
accts += [ Account.load(self.db, id = inventory[0]) ]
|
accts += [ Account.load(self.db, id = inventory[0]) ]
|
||||||
return accts
|
return accts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue