From: David Gageot Date: Wed, 3 Oct 2012 08:05:17 +0000 (+0200) Subject: Fix Property Api X-Git-Tag: 3.3~137 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3c91591c5a1fea2df3c6f76671c5bf853e50d6ee;p=sonarqube.git Fix Property Api --- 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)