From 8503a2b85cdc38f0a44e7b50993c9b24f3ee0fce Mon Sep 17 00:00:00 2001 From: Bohung Date: Fri, 16 Jul 2021 16:17:32 +0800 Subject: [PATCH] Fix import bug. --- app/helpers/admin/event_news_helper.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/helpers/admin/event_news_helper.rb b/app/helpers/admin/event_news_helper.rb index 9998013..e31dd5e 100644 --- a/app/helpers/admin/event_news_helper.rb +++ b/app/helpers/admin/event_news_helper.rb @@ -65,42 +65,49 @@ module Admin::EventNewsHelper anns.remote_image_url = val when 9 value["en"] = val + anns.image_description_translations = value when 10 value["zh_tw"] = val anns.image_description_translations = value value = {} when 11 value["en"] = val + anns.title_translations = value when 12 value["zh_tw"] = val anns.title_translations = value value = {} when 13 value["en"] = val + anns.speaker_translations = value when 14 value["zh_tw"] = val anns.speaker_translations = value value = {} when 15 value["en"] = val + anns.host_translations = value when 16 value["zh_tw"] = val anns.host_translations = value value = {} when 17 value["en"] = val + anns.subtitle_translations = value when 18 value["zh_tw"] = val anns.subtitle_translations = value value = {} when 19 value["en"] = val + anns.text_translations = value when 20 value["zh_tw"] = val anns.text_translations = value value = {} when 21 value["en"] = val + anns.notes_translations = value when 22 value["zh_tw"] = val anns.notes_translations = value @@ -130,6 +137,13 @@ module Admin::EventNewsHelper bf.event_news_id = anns.id bf.save end + when 31 + value["en"] = val + anns.place_translations = value + when 32 + value["zh_tw"] = val + anns.place_translations = value + value = {} end end anns.create_user_id = current_user.id.to_s