]> source.dussan.org Git - sonarqube.git/commitdiff
Fix Property Api
authorDavid Gageot <david@gageot.net>
Wed, 3 Oct 2012 08:05:17 +0000 (10:05 +0200)
committerDavid Gageot <david@gageot.net>
Wed, 3 Oct 2012 08:05:17 +0000 (10:05 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb

index 916340b184bb4b78a741e56ee3174e24cea7f245..05bc74c95a3feada886b564e9fca1757285469bb 100644 (file)
@@ -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)