lib/echi-converter.rb in echi-converter-0.3.4 vs lib/echi-converter.rb in echi-converter-0.3.5
- old
+ new
@@ -289,14 +289,18 @@
if row != nil
@log.debug '<====================START RECORD ' + @record_cnt.to_s + ' ====================>'
echi_record = EchiRecord.new
cnt = 0
@echi_schema["echi_records"].each do | field |
- if field["type"] == "bool" || field["type"] == "bool_int"
+ if field["type"] == "bool" || field["type"] == "boolint"
case row[cnt]
when "0"
echi_record[field["name"]] = "N"
when "1"
+ echi_record[field["name"]] = "Y"
+ when nil
+ echi_record[field["name"]] = "N"
+ else
echi_record[field["name"]] = "Y"
end
@log.debug field["name"] + ' == ' + row[cnt]
else
echi_record[field["name"]] = row[cnt]
\ No newline at end of file