forked from s3lph/matemat
fix: codestyle
This commit is contained in:
parent
f3af4d64a7
commit
8287dc1947
1 changed files with 6 additions and 3 deletions
|
@ -370,7 +370,8 @@ class MatematDatabase(object):
|
|||
FROM products ORDER BY name
|
||||
'''):
|
||||
product_id, name, price_member, price_external, custom_price, stock, stockable, ean = row
|
||||
products.append(Product(product_id, name, price_member, price_external, custom_price, stockable, stock, ean))
|
||||
products.append(
|
||||
Product(product_id, name, price_member, price_external, custom_price, stockable, stock, ean))
|
||||
return products
|
||||
|
||||
def get_product(self, pid: int) -> Product:
|
||||
|
@ -730,11 +731,13 @@ class MatematDatabase(object):
|
|||
for row in rows:
|
||||
ta_id, value, old_balance, date, c, d, m, c_prod, m_agent, m_reason = row
|
||||
if c == ta_id:
|
||||
t: Transaction = Consumption(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC), c_prod)
|
||||
t: Transaction = Consumption(ta_id, user, value, old_balance,
|
||||
datetime.fromtimestamp(date, UTC), c_prod)
|
||||
elif d == ta_id:
|
||||
t = Deposit(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC))
|
||||
elif m == ta_id:
|
||||
t = Modification(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC), m_agent, m_reason)
|
||||
t = Modification(ta_id, user, value, old_balance,
|
||||
datetime.fromtimestamp(date, UTC), m_agent, m_reason)
|
||||
else:
|
||||
t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC))
|
||||
transactions.append(t)
|
||||
|
|
Loading…
Reference in a new issue