Merge pull request #3128 from consul/fix_valuation_with_no_budgets
Fix crash in valuation when there are no budgets
This commit is contained in:
@@ -7,11 +7,9 @@ class Valuation::BudgetsController < Valuation::BaseController
|
||||
def index
|
||||
@budget = current_budget
|
||||
if @budget.present?
|
||||
@investments_with_valuation_open = {}
|
||||
@investments_with_valuation_open = @budget.investments
|
||||
.by_valuator(current_user.valuator.try(:id))
|
||||
.valuation_open
|
||||
.count
|
||||
@investments = @budget.investments
|
||||
.by_valuator(current_user.valuator)
|
||||
.valuation_open
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user