aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-08-14 15:01:16 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-08-14 15:09:54 +0200
commitf5fa4322b61ae4442aab0feeeea44b9871ee64a2 (patch)
tree216ce218f8100ac38e60278a68306160794c00b5 /sonar-server
parentf5b00283602faef90f1f1a3c36a3754cb0bf847b (diff)
downloadsonarqube-f5fa4322b61ae4442aab0feeeea44b9871ee64a2.tar.gz
sonarqube-f5fa4322b61ae4442aab0feeeea44b9871ee64a2.zip
SONAR-4568 Fix issue when updating rule parameter
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
index 02c2d6f89e7..2055707abc3 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
@@ -312,7 +312,7 @@ class RulesConfigurationController < ApplicationController
rule_param = RulesParameter.find(params[:param_id].to_i)
active_rule = ActiveRule.find(params[:active_rule_id].to_i)
# As the active param can be null, we should not raise a RecordNotFound exception when it's not found (as it would be done when using find(:id) function)
- active_param = ActiveRuleParameter.first(params[:id].to_i) if params[:id].to_i > 0
+ active_param = ActiveRuleParameter.find_by_id(params[:id].to_i) if params[:id].to_i > 0
value = params[:value]
if value != ""
active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule) if active_param.nil?
@@ -327,7 +327,6 @@ class RulesConfigurationController < ApplicationController
active_param.destroy
java_facade.ruleParamChanged(profile.id, active_rule.id, rule_param.name, old_value, nil, current_user.name)
end
-
# let's reload the active rule
active_rule = ActiveRule.find(active_rule.id)
render :partial => 'rule', :locals => {:profile => profile, :rule => active_rule.rule, :active_rule => active_rule}