mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 11:22:21 +00:00
fix: use account status for balance records instead of hardcoded 'active'
- Modified sync service to pass account status to balance persistence - Updated database service to use account_status from balance data - Fixed 8 balance records that had incorrect 'active' status - All balance records now have consistent 'READY' status matching accounts - Future balance records will inherit correct status from account data
This commit is contained in:
committed by
Elisiário Couto
parent
eaaea6e459
commit
541cb262ee
@@ -446,7 +446,7 @@ class DatabaseService:
|
||||
(
|
||||
account_id,
|
||||
balance_data.get("institution_id", "unknown"),
|
||||
"active",
|
||||
balance_data.get("account_status"),
|
||||
balance_data.get("iban", "N/A"),
|
||||
float(balance_amount["amount"]),
|
||||
balance_amount["currency"],
|
||||
|
||||
@@ -68,6 +68,9 @@ class SyncService:
|
||||
account_details.get("institution_id")
|
||||
)
|
||||
balances_with_account_info["iban"] = account_details.get("iban")
|
||||
balances_with_account_info["account_status"] = (
|
||||
account_details.get("status")
|
||||
)
|
||||
await self.database.persist_balance(
|
||||
account_id, balances_with_account_info
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user