Check if models_config exists to support migrations of existing systems.

This commit is contained in:
Martin Edenhofer 2015-08-16 11:24:15 +02:00
parent dac3a506ec
commit ecb0ace02d

View file

@ -2,7 +2,7 @@
if ActiveRecord::Base.connection.tables.include?('settings')
models_current = Models.searchable.map(&:to_s)
models_config = Setting.get('models_searchable')
if models_current != models_config
if models_config && models_current != models_config
Setting.set('models_searchable', models_current)
end
end