Fixed migration on fresh setups.

This commit is contained in:
Martin Edenhofer 2015-07-12 03:37:28 +02:00
parent ac43efc60f
commit 9c0a535d28

View file

@ -2,6 +2,7 @@ class UpdateSetting < ActiveRecord::Migration
def up def up
%w(product_name product_logo organization).each {|setting_name| %w(product_name product_logo organization).each {|setting_name|
setting = Setting.find_by(name: setting_name) setting = Setting.find_by(name: setting_name)
next if !setting
setting.area = 'System::Branding' setting.area = 'System::Branding'
setting.save setting.save
} }