mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 13:42:10 +01:00
fix: empty category in Plaid
This commit is contained in:
@@ -239,11 +239,12 @@ def new_bank_transaction(transaction):
|
|||||||
withdrawal = 0.0
|
withdrawal = 0.0
|
||||||
|
|
||||||
tags = []
|
tags = []
|
||||||
try:
|
if transaction["category"]:
|
||||||
tags += transaction["category"]
|
try:
|
||||||
tags += [f'Plaid Cat. {transaction["category_id"]}']
|
tags += transaction["category"]
|
||||||
except KeyError:
|
tags += [f'Plaid Cat. {transaction["category_id"]}']
|
||||||
pass
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
if not frappe.db.exists(
|
if not frappe.db.exists(
|
||||||
"Bank Transaction", dict(transaction_id=transaction["transaction_id"])
|
"Bank Transaction", dict(transaction_id=transaction["transaction_id"])
|
||||||
|
|||||||
Reference in New Issue
Block a user