mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix recent settings migrations (#36602)
This commit is contained in:
parent
ab5b7e3776
commit
38f15a89fe
3 changed files with 21 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue