forked from brmlab/brmbar-github
Shop: sell log res
This commit is contained in:
parent
0a8e2b727b
commit
343df879fb
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue