Commit d0767b39 by liyijie

feat: fix import_headers_result

parent 93d3cdb8
......@@ -113,6 +113,7 @@ module TalltyImportExport
# TODO: 这里,对于import_headers,后面还是不要传参数了
# 需要合并proc,前端没有办法把proc传过来
def import_headers_result
if @headers.present?
import_header_hash = import_headers.to_h { |header| [header.with_indifferent_access[:key], header] }.with_indifferent_access
@headers.map do |header|
key = header[:key]
......@@ -121,6 +122,9 @@ module TalltyImportExport
end
header
end
else
@headers = import_headers
end
rescue
@headers
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment