From aee3a1d24f1ae93b24fc2b110d28916684396bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Thu, 21 Aug 2025 17:12:22 +0200 Subject: [PATCH] Fix db 2. --- brmbar3/brmbar/Account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brmbar3/brmbar/Account.py b/brmbar3/brmbar/Account.py index 2499d05..e54ea8d 100644 --- a/brmbar3/brmbar/Account.py +++ b/brmbar3/brmbar/Account.py @@ -20,7 +20,7 @@ class Account: @classmethod def load_by_barcode(cls, db, barcode): logger.debug("load_by_barcode: '%s'", barcode) - account_id, account_name, account_acctype, currency_id, currency_name = db.execute_and_fetch( + account_id, account_name, account_acctype, currency_id, currency_name = self.db.execute_and_fetch( "SELECT account_id, account_name, account_acctype, currency_id, currency_name FROM public.account_class_initialization_data('by_barcode', NULL, %s)", [barcode]) currency = Currency(db, currency_id, currency_name) @@ -29,7 +29,7 @@ class Account: @classmethod def load(cls, db, id=None): """Constructor for existing account""" - account_id, account_name, account_acctype, currency_id, currency_name = db.execute_and_fetch( + account_id, account_name, account_acctype, currency_id, currency_name = self.db.execute_and_fetch( "SELECT account_id, account_name, account_acctype, currency_id, currency_name FROM public.account_class_initialization_data('by_id', %s, NULL)", [id]) currency = Currency(db, currency_id, currency_name)