Commit a502d981 by liyijie

import headers push exist_header & header

parent 2ea9273c
...@@ -119,9 +119,9 @@ module TalltyImportExport ...@@ -119,9 +119,9 @@ module TalltyImportExport
result = [] result = []
val.map do |header| val.map do |header|
if (exist_header = import_headers_result.find { |model_header| model_header[:key] === header[:key] }) if (exist_header = import_headers_result.find { |model_header| model_header[:key] === header[:key] })
result.push(exist_header.merge(name: header[:name], json: header[:json])) result.push(exist_header.merge(header.compact))
else else
result.push({ key: header[:key], name: header[:name], json: header[:json]}) result.push(header)
end end
end 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