mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37: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')
|
@validation_settings = SettingEntry.with_group('domain_validation')
|
||||||
@expiration_settings = SettingEntry.with_group('domain_expiration')
|
@expiration_settings = SettingEntry.with_group('domain_expiration')
|
||||||
@other_settings = SettingEntry.with_group('other')
|
@other_settings = SettingEntry.with_group('other')
|
||||||
|
.where.not(code: 'default_language')
|
||||||
@billing_settings = SettingEntry.with_group('billing')
|
@billing_settings = SettingEntry.with_group('billing')
|
||||||
@contacts_settings = SettingEntry.with_group('contacts')
|
@contacts_settings = SettingEntry.with_group('contacts')
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,6 +52,7 @@ class CopyLegacySettingsToNewModel < ActiveRecord::Migration[6.0]
|
||||||
old_settings = ActiveRecord::Base.connection.execute(sql)
|
old_settings = ActiveRecord::Base.connection.execute(sql)
|
||||||
|
|
||||||
old_settings.each do |origin|
|
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 = SettingEntry.find_or_initialize_by(code: origin['var'])
|
||||||
entry[:format] = 'string'
|
entry[:format] = 'string'
|
||||||
entry[:format] = 'boolean' if boolean_vars.include? entry.code
|
entry[:format] = 'boolean' if boolean_vars.include? entry.code
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue