brmbar.Shop.account_list(): Actually use acctype parameter

This commit is contained in:
Petr Baudis 2012-09-25 00:12:06 +02:00
parent 83735fec98
commit 0645e6c9b0

View file

@ -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", ["debt"])
cur.execute("SELECT id FROM accounts WHERE acctype = %s", [acctype])
for inventory in cur:
accts += [ Account.load(self.db, id = inventory[0]) ]
return accts