mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +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
|
@ -40,7 +40,7 @@ class Family < ApplicationRecord
|
|||
Sync.joins("LEFT JOIN plaid_items ON plaid_items.id = syncs.syncable_id AND syncs.syncable_type = 'PlaidItem'")
|
||||
.joins("LEFT JOIN accounts ON accounts.id = syncs.syncable_id AND syncs.syncable_type = 'Account'")
|
||||
.where("syncs.syncable_id = ? OR accounts.family_id = ? OR plaid_items.family_id = ?", id, id, id)
|
||||
.incomplete
|
||||
.visible
|
||||
.exists?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue