From 97685bf68cf6441818d79bd3cd4b73ee72f02324 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 7 Aug 2024 11:23:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/pm/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/pm/issues_controller.rb b/app/controllers/api/pm/issues_controller.rb index 3506dfdea..a85c5b310 100644 --- a/app/controllers/api/pm/issues_controller.rb +++ b/app/controllers/api/pm/issues_controller.rb @@ -147,7 +147,7 @@ class Api::Pm::IssuesController < Api::Pm::BaseController return render_error('请输入正确的项目ID.') if params[:pm_project_id].blank? return render_error('请输入正确的组织ID.') if params[:organization_id].blank? types = {requirement: 1, task: 2, bug: 3} - doc = SimpleXlsxReader.parse(params[:file].to_io) + doc = SimpleXlsxReader.open(params[:file].tempfile) doc.sheets.each do |sheet| type = types["#{sheet.name}".to_sym] sheet.rows.each.with_index do |row, index|