Fixes an issue that might cause import failures.

This commit is contained in:
chiu 2025-11-21 09:15:20 +00:00
parent bac3abd704
commit 4982b34a03
1 changed files with 5 additions and 1 deletions

View File

@ -232,7 +232,11 @@ class Admin::AnnouncementsController < OrbitAdminController
import_from_wordpress params["import_xml"].tempfile
redirect_to admin_announcements_path
end
def localize_data(value)
locale_key = I18n.locale.to_s
{ locale_key => value }
end
def importanns
workbook = RubyXL::Parser.parse(params["import_file"].tempfile)
raw_categories = @module_app.categories.asc(:created_at).to_a.map.with_index{|v, k| [k.to_s,v]}.to_h