mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Handle stale syncs (#2257)
* Handle stale syncs * Use `visible` sync logic in sidebar groups
This commit is contained in:
parent
10f255a9a9
commit
9f13b5bb83
9 changed files with 79 additions and 7 deletions
|
@ -56,7 +56,7 @@ class PlaidItem < ApplicationRecord
|
|||
Sync.joins("LEFT JOIN accounts a ON a.id = syncs.syncable_id AND syncs.syncable_type = 'Account'")
|
||||
.joins("LEFT JOIN plaid_accounts pa ON pa.id = a.plaid_account_id")
|
||||
.where("syncs.syncable_id = ? OR pa.plaid_item_id = ?", id, id)
|
||||
.incomplete
|
||||
.visible
|
||||
.exists?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue