Merge pull request #3330 from consul/backport-fix_valuation_tags

Fix valuation tags being overwritten
This commit is contained in:
Javier Martín
2019-02-26 21:42:58 +01:00
committed by GitHub
5 changed files with 33 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
end
def update
set_valuation_tags
if @investment.update(budget_investment_params)
redirect_to admin_budget_budget_investment_path(@budget,
@investment,
@@ -118,11 +117,6 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
@ballot = @budget.balloting? ? query.first_or_create : query.first_or_initialize
end
def set_valuation_tags
@investment.set_tag_list_on(:valuation, budget_investment_params[:valuation_tag_list])
params[:budget_investment] = params[:budget_investment].except(:valuation_tag_list)
end
def parse_valuation_filters
if params[:valuator_or_group_id]
model, id = params[:valuator_or_group_id].split("_")