mirror of
https://github.com/internetee/registry.git
synced 2025-06-04 11:47:30 +02:00
Remove some keys from legacy copy/show
Setting with key 'days_to_keep_business_registry_cache' is not copied/shown now. Setting with key 'default_language' is copied, but shown only once now.
This commit is contained in:
parent
75181f5bea
commit
56c7eb5f26
2 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ module Admin
|
|||
@validation_settings = SettingEntry.with_group('domain_validation')
|
||||
@expiration_settings = SettingEntry.with_group('domain_expiration')
|
||||
@other_settings = SettingEntry.with_group('other')
|
||||
.where.not(code: 'default_language')
|
||||
@billing_settings = SettingEntry.with_group('billing')
|
||||
@contacts_settings = SettingEntry.with_group('contacts')
|
||||
end
|
||||
|
|
|
@ -52,6 +52,7 @@ class CopyLegacySettingsToNewModel < ActiveRecord::Migration[6.0]
|
|||
old_settings = ActiveRecord::Base.connection.execute(sql)
|
||||
|
||||
old_settings.each do |origin|
|
||||
next if origin['var'] == 'days_to_keep_business_registry_cache'
|
||||
entry = SettingEntry.find_or_initialize_by(code: origin['var'])
|
||||
entry[:format] = 'string'
|
||||
entry[:format] = 'boolean' if boolean_vars.include? entry.code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue