Fixed a crash in receipt generation.
This commit is contained in:
parent
293ad9f06e
commit
3d25540a1f
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ class MatematDatabase(object):
|
||||||
else:
|
else:
|
||||||
t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date))
|
t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date))
|
||||||
transactions.append(t)
|
transactions.append(t)
|
||||||
if write:
|
if write and len(transactions) > 0:
|
||||||
cursor.execute('''
|
cursor.execute('''
|
||||||
INSERT INTO receipts (user_id, first_ta_id, last_ta_id)
|
INSERT INTO receipts (user_id, first_ta_id, last_ta_id)
|
||||||
VALUES (:user_id, :first_ta, :last_ta)
|
VALUES (:user_id, :first_ta, :last_ta)
|
||||||
|
|
Loading…
Reference in a new issue