Skip to content

Commit

Permalink
fix: use sub tx if bulk tx has only one sub tx
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Jan 21, 2025
1 parent bb1818b commit 252cbe2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion banking/ebics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def sync_ebics_transactions(
# Skip PDNG and INFO transactions
continue

if user.split_batch_transactions and transaction.batch and len(transaction):
if (
transaction.batch
and (user.split_batch_transactions or len(transaction) == 1)
and len(transaction) >= 1
):
# Split batch transactions into sub-transactions, based on info
# from camt.054 that is sometimes available.
# If that's not possible, create a single transaction
Expand Down

0 comments on commit 252cbe2

Please sign in to comment.