Files
sure/app
LPW 42b94947bf Fix: SimpleFIN account re-link duplication (#554)
* Add orphan pruning tests for Simplefin importer and implement pruning logic

- Introduced `SimplefinItem::ImporterOrphanPruneTest` to verify orphaned `SimplefinAccount` pruning scenarios.
- Added logic in `SimplefinItem::Importer` to remove orphaned `SimplefinAccounts` when upstream account IDs change.
- Ensured linked accounts via legacy FK or `AccountProvider` are preserved during pruning.
- Updated sync stats to track pruned accounts.

* Optimize SimplefinAccount query in importer to prevent N+1 issues

- Added eager-loading of `account` and `account_provider` associations when retrieving orphaned `SimplefinAccounts`.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-07 13:58:47 +01:00
..
2025-10-22 19:14:03 +02:00
2025-11-17 21:51:37 +01:00