Fix import bug.

This commit is contained in:
BoHung Chiu 2021-08-09 12:23:55 +08:00
parent ba5b45997a
commit 21601fee18
1 changed files with 2 additions and 2 deletions

View File

@ -111,8 +111,8 @@ module Admin::AnnouncementsHelper
files.each_with_index do |file, i| files.each_with_index do |file, i|
bf = BulletinFile.new bf = BulletinFile.new
bf.remote_file_url = file.strip rescue nil bf.remote_file_url = file.strip rescue nil
bf.title_translations = {"en" => (desc_en[i] rescue ""), "zh_tw" => (desc_zh_tw[i] rescue "")} bf.title_translations = {"en" => (alt_en[i] rescue ""), "zh_tw" => (alt_zh_tw[i] rescue "")}
bf.description_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.bulletin_id = anns.id
bf.save bf.save
end end