summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-03 10:05:17 +0200
committerDavid Gageot <david@gageot.net>2012-10-03 10:05:17 +0200
commit3c91591c5a1fea2df3c6f76671c5bf853e50d6ee (patch)
treed89a9b9c51e381a02e529ea9fc99b9a81de02a9c
parent6c6edf3067e271fd45f3df1cc4b5e0ffceccf69e (diff)
downloadsonarqube-3c91591c5a1fea2df3c6f76671c5bf853e50d6ee.tar.gz
sonarqube-3c91591c5a1fea2df3c6f76671c5bf853e50d6ee.zip
Fix Property Api
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb4
1 files changed, 3 insertions, 1 deletions
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)