fix: codestyle
All checks were successful
/ test (push) Successful in 1m23s
/ codestyle (push) Successful in 1m5s
/ build_wheel (push) Successful in 2m1s
/ build_debian (push) Successful in 2m27s

This commit is contained in:
s3lph 2024-11-23 04:37:47 +01:00
parent f3af4d64a7
commit 8287dc1947
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5

View file

@ -370,7 +370,8 @@ class MatematDatabase(object):
FROM products ORDER BY name FROM products ORDER BY name
'''): '''):
product_id, name, price_member, price_external, custom_price, stock, stockable, ean = row 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 return products
def get_product(self, pid: int) -> Product: def get_product(self, pid: int) -> Product:
@ -730,11 +731,13 @@ class MatematDatabase(object):
for row in rows: for row in rows:
ta_id, value, old_balance, date, c, d, m, c_prod, m_agent, m_reason = row ta_id, value, old_balance, date, c, d, m, c_prod, m_agent, m_reason = row
if c == ta_id: 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: elif d == ta_id:
t = Deposit(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC)) t = Deposit(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC))
elif m == ta_id: 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: else:
t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC)) t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date, UTC))
transactions.append(t) transactions.append(t)