From 21601fee183a537d3be8878da8bca8f7b4774fca Mon Sep 17 00:00:00 2001 From: Bohung Date: Mon, 9 Aug 2021 12:23:55 +0800 Subject: [PATCH] Fix import bug. --- app/helpers/admin/announcements_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/admin/announcements_helper.rb b/app/helpers/admin/announcements_helper.rb index 60b9c73..e7106b2 100644 --- a/app/helpers/admin/announcements_helper.rb +++ b/app/helpers/admin/announcements_helper.rb @@ -111,8 +111,8 @@ module Admin::AnnouncementsHelper files.each_with_index do |file, i| bf = BulletinFile.new bf.remote_file_url = file.strip rescue nil - bf.title_translations = {"en" => (desc_en[i] rescue ""), "zh_tw" => (desc_zh_tw[i] rescue "")} - bf.description_translations = {"en" => (alt_en[i] rescue ""), "zh_tw" => (alt_zh_tw[i] rescue "")} + bf.title_translations = {"en" => (alt_en[i] rescue ""), "zh_tw" => (alt_zh_tw[i] rescue "")} + bf.description_translations = {"en" => (desc_en[i] rescue ""), "zh_tw" => (desc_zh_tw[i] rescue "")} bf.bulletin_id = anns.id bf.save end