mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:13:39 +08:00
FIX: Disable overrides in migrations
Site texts did not exist when this migration was created.
This commit is contained in:
parent
bcc0ed7c9c
commit
d41cbc5a30
|
@ -2,7 +2,12 @@ class MigrateTosSetting < ActiveRecord::Migration
|
|||
def up
|
||||
res = execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")
|
||||
if res.present? && res.cmd_tuples > 0
|
||||
label = I18n.t("terms_of_service.signup_form_message")
|
||||
label = nil
|
||||
|
||||
I18n.overrides_disabled do
|
||||
label = I18n.t("terms_of_service.signup_form_message")
|
||||
end
|
||||
|
||||
res = execute("SELECT value FROM site_texts WHERE text_type = 'tos_signup_form_message'")
|
||||
if res.present? && res.cmd_tuples == 1
|
||||
label = res[0]['value']
|
||||
|
|
Loading…
Reference in New Issue
Block a user