diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-05 09:38:02 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-05 09:38:15 +0200 |
commit | f98724f7fce3ad44d7ade923f56c05a15ebdd1a3 (patch) | |
tree | 4e5a09beb30492b291e3238789d9e7d3c3995cfa /sonar-server | |
parent | 1d595d0b11b701a1d2abf4d71efcd18b57e9396b (diff) | |
download | sonarqube-f98724f7fce3ad44d7ade923f56c05a15ebdd1a3.tar.gz sonarqube-f98724f7fce3ad44d7ade923f56c05a15ebdd1a3.zip |
SONAR-3755 Do not display errors node when no error in WS
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/api/action_plans_controller.rb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/action_plans_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/action_plans_controller.rb index 9e8fdfa36ec..d9cb352452a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/action_plans_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/action_plans_controller.rb @@ -152,7 +152,7 @@ class Api::ActionPlansController < Api::ApiController def result_to_hash(result) hash = {} - if result.errors + if result.errors and !result.errors.empty? hash[:errors] = result.errors().map do |error| { :msg => (error.text ? error.text : Api::Utils.message(error.l10nKey, :params => error.l10nParams)) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb index a4a83556c18..7d21da4eb0d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb @@ -286,7 +286,7 @@ class Api::IssuesController < Api::ApiController def result_to_hash(result) hash = {} - if result.errors + if result.errors and !result.errors.empty? hash[:errors] = result.errors().map do |error| { :msg => (error.text ? error.text : Api::Utils.message(error.l10nKey, :params => error.l10nParams)) |