Only migrate config vars that were explicitly set (#13593)
This commit is contained in:
parent
69f4c039da
commit
8c9a0dc55a
2 changed files with 6 additions and 5 deletions
|
|
@ -16,10 +16,9 @@ module DataUpdateScripts
|
|||
|
||||
# All these fields got renamed so we migrate them explicitly
|
||||
CAMPAIGN_SETTINGS.each do |setting|
|
||||
Settings::Campaign.public_send(
|
||||
"#{setting}=",
|
||||
SiteConfig.public_send("campaign_#{setting}"),
|
||||
)
|
||||
if (value = SiteConfig.public_send("campaign_#{setting}"))
|
||||
Settings::Campaign.public_send("#{setting}=", value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ module DataUpdateScripts
|
|||
|
||||
def run
|
||||
SETTINGS.each do |setting|
|
||||
Settings::Mascot.public_send("#{setting}=", SiteConfig.public_send("mascot_#{setting}"))
|
||||
if (value = SiteConfig.public_send("mascot_#{setting}"))
|
||||
Settings::Mascot.public_send("#{setting}=", value)
|
||||
end
|
||||
end
|
||||
Settings::Mascot.mascot_user_id = SiteConfig.mascot_user_id
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue