Commit 54d0723a by liyijie

fix: 解决未关联对象的问题

parent e5bdde31
...@@ -94,7 +94,9 @@ module TalltyImportExport ...@@ -94,7 +94,9 @@ module TalltyImportExport
association_records.each do |association_record| association_records.each do |association_record|
row = [] row = []
headers.each_with_index do |header, col_index| headers.each_with_index do |header, col_index|
records = @each_method.present? ? try_method(association_record, @each_method) : [association_record] records = @each_method.present? ?
(try_method(association_record, @each_method) || [nil]) :
[association_record]
records.each do |record| records.each do |record|
index += 1 index += 1
_data = header[:source] ? _data = header[:source] ?
......
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