06/01 Review and optimize on UI/UX, security, and functionality

This commit is contained in:
2026-06-01 15:33:28 -04:00
parent 3d0ebc92c6
commit 8ca54827b2
6 changed files with 258 additions and 137 deletions
+7 -2
View File
@@ -137,12 +137,17 @@ def import_rows(rows, skip_duplicates=True):
for row in rows:
if skip_duplicates:
existing = Transaction.query.filter_by(
q = Transaction.query.filter_by(
date=row['date'],
description=row['description'],
amount=row['amount'],
transaction_type=row['transaction_type'],
).first()
)
# Scope to the same account when one is known, so identical
# transactions on different accounts are not incorrectly skipped.
if row.get('account_id'):
q = q.filter_by(account_id=row['account_id'])
existing = q.first()
if existing:
skipped += 1
continue