1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

Merge branch 'main' of github.com:maybe-finance/maybe into rulers-dividers

This commit is contained in:
hatz 2025-05-15 10:11:11 -05:00
commit d6ea98d6e7
No known key found for this signature in database

View file

@ -1,6 +1,8 @@
class Account::SyncCompleteEvent class Account::SyncCompleteEvent
attr_reader :account attr_reader :account
Error = Class.new(StandardError)
def initialize(account) def initialize(account)
@account = account @account = account
end end
@ -38,7 +40,12 @@ class Account::SyncCompleteEvent
# The sidebar will show the account in both its classification tab and the "all" tab, # The sidebar will show the account in both its classification tab and the "all" tab,
# so we need to broadcast to both. # so we need to broadcast to both.
def account_group_ids def account_group_ids
return [] unless account_group.present? unless account_group.present?
error = Error.new("Account #{account.id} is not part of an account group")
Rails.logger.warn(error.message)
Sentry.capture_exception(error, level: :warning)
return []
end
id = account_group.id id = account_group.id
[ id, "#{account_group.classification}_#{id}" ] [ id, "#{account_group.classification}_#{id}" ]