fix: Plaid Integration status and categories
"pending" is a boolean not a string, and "category" doesn't exist in some edge cases
This commit is contained in:
parent
924911e743
commit
43f530b077
@ -237,9 +237,10 @@ def new_bank_transaction(transaction):
|
|||||||
deposit = abs(amount)
|
deposit = abs(amount)
|
||||||
withdrawal = 0.0
|
withdrawal = 0.0
|
||||||
|
|
||||||
status = "Pending" if transaction["pending"] == "True" else "Settled"
|
status = "Pending" if transaction["pending"] == True else "Settled"
|
||||||
|
|
||||||
tags = []
|
tags = []
|
||||||
|
if transaction["category"]:
|
||||||
try:
|
try:
|
||||||
tags += transaction["category"]
|
tags += transaction["category"]
|
||||||
tags += [f'Plaid Cat. {transaction["category_id"]}']
|
tags += [f'Plaid Cat. {transaction["category_id"]}']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user