From 343df879fb5e95e0c2465c0435d5b1aaedcfafb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Sat, 12 Jul 2025 17:40:16 +0200 Subject: [PATCH] Shop: sell log res --- brmbar3/brmbar/Shop.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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