forked from brmlab/brmbar-github
Shop.py: logging to sell
This commit is contained in:
parent
3ab537f7d9
commit
93f9b336b6
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
import brmbar
|
||||
from .Currency import Currency
|
||||
from .Account import Account
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Shop:
|
||||
""" BrmBar Shop
|
||||
|
@ -26,6 +28,8 @@ class Shop:
|
|||
|
||||
def sell(self, item, user, amount = 1):
|
||||
# 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(
|
||||
"SELECT public.sell_item(%s, %s, %s, %s, %s)",
|
||||
[item.id, amount, user.id, self.currency.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue