diff --git a/config/initializers/models_searchable.rb b/config/initializers/models_searchable.rb index d57d805f7..2659b0943 100644 --- a/config/initializers/models_searchable.rb +++ b/config/initializers/models_searchable.rb @@ -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