From 3c91591c5a1fea2df3c6f76671c5bf853e50d6ee Mon Sep 17 00:00:00 2001 From: David Gageot Date: Wed, 3 Oct 2012 10:05:17 +0200 Subject: [PATCH] Fix Property Api --- .../WEB-INF/app/controllers/api/properties_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb index 916340b184b..05bc74c95a3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb @@ -79,7 +79,9 @@ class Api::PropertiesController < Api::ApiController resource_id_or_key = resource.id end prop=Property.set(key, value, resource_id_or_key) - if prop.valid? + if prop.nil? + render_success('property created') # Cleared + elsif prop.valid? render_success('property created') else render_bad_request(prop.validation_error_message) -- 2.39.5