Shop.py: logging to sell

This commit is contained in:
Dominik Pantůček 2025-07-12 17:25:27 +02:00
parent 3ab537f7d9
commit 93f9b336b6

View file

@ -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,