Fix recent settings migrations (#36602)
This commit is contained in:
@@ -12,8 +12,7 @@ class MigrateTimelinePreviewSetting < ActiveRecord::Migration[8.0]
|
||||
Setting.upsert_all(
|
||||
%w(local_live_feed_access remote_live_feed_access local_topic_feed_access remote_topic_feed_access).map do |var|
|
||||
{ var: var, value: value ? "--- public\n" : "--- authenticated\n" }
|
||||
end,
|
||||
unique_by: :var
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ class MigrateLandingPageSetting < ActiveRecord::Migration[8.0]
|
||||
|
||||
value = YAML.safe_load(setting.attributes['value'], permitted_classes: [ActiveSupport::HashWithIndifferentAccess, Symbol])
|
||||
|
||||
Setting.upsert(
|
||||
Setting.upsert({
|
||||
var: 'landing_page',
|
||||
value: value ? "--- trends\n" : "--- about\n"
|
||||
)
|
||||
value: value ? "--- trends\n" : "--- about\n",
|
||||
})
|
||||
end
|
||||
|
||||
def down; end
|
||||
|
||||
Reference in New Issue
Block a user