mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 05:39:39 +02:00
Fixed Data Access Restriction (#636)
Co-authored-by: Harshit Chaudhary <harshit.chaudhary@procol.in>
This commit is contained in:
parent
cd8d741fe1
commit
39d57a167e
1 changed files with 1 additions and 4 deletions
|
@ -71,10 +71,7 @@ class Account < ApplicationRecord
|
||||||
Accountable.by_classification.each do |classification, types|
|
Accountable.by_classification.each do |classification, types|
|
||||||
types.each do |type|
|
types.each do |type|
|
||||||
group = grouped_accounts[classification.to_sym].add_child_group(type, currency)
|
group = grouped_accounts[classification.to_sym].add_child_group(type, currency)
|
||||||
Accountable.from_type(type).includes(:account).each do |accountable|
|
self.where(accountable_type: type).each do |account|
|
||||||
account = accountable.account
|
|
||||||
next unless account
|
|
||||||
|
|
||||||
value_node = group.add_value_node(
|
value_node = group.add_value_node(
|
||||||
account,
|
account,
|
||||||
account.balance_money.exchange_to(currency) || Money.new(0, currency),
|
account.balance_money.exchange_to(currency) || Money.new(0, currency),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue