forked from brmlab/brmbar-github
Fix db.
This commit is contained in:
parent
dd8c93e967
commit
e604e0000b
1 changed files with 2 additions and 2 deletions
|
|
@ -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 = 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 = 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue