]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4730 Db upgrade 418 fails on Oracle
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 27 Sep 2013 09:58:39 +0000 (11:58 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 27 Sep 2013 09:58:39 +0000 (11:58 +0200)
sonar-server/src/main/webapp/WEB-INF/db/migrate/418_migrate_default_permissions.rb

index c337013e57e6b2f026f25cbc09181d0644f36618..beb2df3327784584d999b02401d109e7b22f9698 100644 (file)
@@ -85,7 +85,7 @@ class MigrateDefaultPermissions < ActiveRecord::Migration
       existing_properties["sonar.role.user.#{qualifier}.defaultUsers"] = Property.find_by_prop_key("sonar.role.user.#{qualifier}.defaultUsers")
       existing_properties["sonar.role.codeviewer.#{qualifier}.defaultUsers"] = Property.find_by_prop_key("sonar.role.codeviewer.#{qualifier}.defaultUsers")
 
-      configured_values = existing_properties.values.reject {|prop| prop.nil?}
+      configured_values = existing_properties.values.reject {|prop| prop.nil? || prop.text_value.nil?}
 
       # Existing properties are migrated only when upgrading an existing SonarQube instance
       # Subviews permissions are not migrated since they are not used