diff --git a/brmbar3/brmbar/Shop.py b/brmbar3/brmbar/Shop.py index 2c878b2..c6f7c1c 100644 --- a/brmbar3/brmbar/Shop.py +++ b/brmbar3/brmbar/Shop.py @@ -30,12 +30,13 @@ class Shop: # Call the stored procedure for the sale logger.debug("sell: item.id=%s amount=%s user.id=%s self.currency.id=%s", item.id, amount, user.id, self.currency.id) - cost = self.db.execute_and_fetch( + res = self.db.execute_and_fetch( "SELECT public.sell_item(%s, %s, %s, %s, %s)", [item.id, amount, user.id, self.currency.id, "BrmBar sale of {0}x {1} to {2}".format(amount, item.name, user.name)] - )[0]#[0] - + )#[0] + logger.debug("sell: res=%s", res) + cost = res[0] self.db.commit() return cost # Sale: Currency conversion from item currency to shop currency