]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3529 Fixe edition of boolean property
authorDavid Gageot <david@gageot.net>
Mon, 1 Oct 2012 08:13:39 +0000 (10:13 +0200)
committerDavid Gageot <david@gageot.net>
Mon, 1 Oct 2012 08:13:39 +0000 (10:13 +0200)
sonar-server/src/main/webapp/WEB-INF/app/models/property.rb

index 442a715db70697225d23543d375764c8bb43f1b4..ec98d312c9abeddffdd256c7d7b5d4de228adf2b 100644 (file)
@@ -93,8 +93,8 @@ class Property < ActiveRecord::Base
       value = value.first
     end
 
-    value = value.to_s if value
-    text_value = (value.blank? ? nil : value)
+    text_value = value.to_s if defined? value
+    text_value = nil if text_value.blank?
 
     prop = by_key(key, resource_id, user_id)
     if prop