diff --git a/lib/user_segments.rb b/lib/user_segments.rb index e922c2321..1505e08e7 100644 --- a/lib/user_segments.rb +++ b/lib/user_segments.rb @@ -24,8 +24,9 @@ class UserSegments end def self.feasible_and_undecided_investment_authors - feasibility = %w(feasible undecided) - author_ids(current_budget_investments.where(feasibility: feasibility).pluck(:author_id).uniq) + unfeasible_and_finished_condition = "feasibility = 'unfeasible' and valuation_finished = true" + investments = current_budget_investments.where.not(unfeasible_and_finished_condition) + author_ids(investments.pluck(:author_id).uniq) end def self.selected_investment_authors