|
@@ -62,13 +62,14 @@ Dir["#{config_path}/*"].each do |path|
|
|
|
table.fields << field
|
|
|
end
|
|
|
# 验证 Id 列
|
|
|
- next if field_id.nil?
|
|
|
table.id_field = field_id
|
|
|
# 处理条目形成引用表
|
|
|
while !csv.eof?
|
|
|
line = csv.readline
|
|
|
next if field_id_name.nil?
|
|
|
- table.name2id[line[field_id_name.column_id]] = line[field_id.column_id].upcase
|
|
|
+ id = line[field_id.column_id]
|
|
|
+ next if id.nil? || id.empty?
|
|
|
+ table.name2id[line[field_id_name.column_id]] = id.upcase
|
|
|
end
|
|
|
# 回滚 csv 状态至表头读取后
|
|
|
csv.rewind
|