Skip to content

Commit

Permalink
fix: empty category in Plaid
Browse files Browse the repository at this point in the history
  • Loading branch information
RJPvT authored Jan 13, 2024
1 parent a7922e1 commit 1acaa20
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,12 @@ def new_bank_transaction(transaction):
withdrawal = 0.0

tags = []
try:
tags += transaction["category"]
tags += [f'Plaid Cat. {transaction["category_id"]}']
except KeyError:
pass
if transaction["category"]:
try:
tags += transaction["category"]
tags += [f'Plaid Cat. {transaction["category_id"]}']
except KeyError:
pass

if not frappe.db.exists(
"Bank Transaction", dict(transaction_id=transaction["transaction_id"])
Expand Down

0 comments on commit 1acaa20

Please sign in to comment.