File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ async def start_import(self) -> AsyncGenerator[Any, Any]:
144144 account_type = (
145145 "revenue" if transaction_type == "credit" else "Expense"
146146 )
147+
147148 yield f"No match, still a valid IBAN. Creating a new account: { txn } - { cp_iban } - { account_type } "
148149 response = await self ._firefly_client .create_account (
149150 {
@@ -159,12 +160,19 @@ async def start_import(self) -> AsyncGenerator[Any, Any]:
159160 ),
160161 }
161162 )
163+
162164 if response .status_code != 200 :
163165 yield f"Error creating account in Firefly: { response .text } "
164166 continue
165167 yield f"New account created: { txn .get ('meta' , {}).get ('counter_party_preferred_name' )} - { cp_iban } "
166168 linked_account = response .json ()["data" ]
167169 newly_created += 1
170+
171+ yield "Firefly: Enforcing refresh accounts from Firefly"
172+ firefly_accounts = (
173+ await self ._firefly_client .get_account_paginated ()
174+ )
175+ yield f"Firefly: A total of { len (firefly_accounts )} account(s) found"
168176 else :
169177 unmatching += 1
170178 yield f"Transaction has no IBAN: { txn ['description' ]} "
You can’t perform that action at this time.
0 commit comments