forked from s3lph/matemat
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:
|
||||
t = Transaction(ta_id, user, value, old_balance, datetime.fromtimestamp(date))
|
||||
transactions.append(t)
|
||||
if write:
|
||||
if write and len(transactions) > 0:
|
||||
cursor.execute('''
|
||||
INSERT INTO receipts (user_id, first_ta_id, last_ta_id)
|
||||
VALUES (:user_id, :first_ta, :last_ta)
|
||||
|
|
Loading…
Reference in a new issue