diff --git a/app/models/budget/ballot.rb b/app/models/budget/ballot.rb index b53e8b8e6..27b0d9100 100644 --- a/app/models/budget/ballot.rb +++ b/app/models/budget/ballot.rb @@ -6,8 +6,8 @@ class Budget has_many :lines, dependent: :destroy has_many :investments, through: :lines - has_many :groups, -> { uniq }, through: :lines - has_many :headings, -> { uniq }, through: :groups + has_many :groups, -> { distinct }, through: :lines + has_many :headings, -> { distinct }, through: :groups def add_investment(investment) lines.create(investment: investment).persisted?