Browse Source

fix failing test

pull/545/head
Dushan Despotovic 3 years ago
parent
commit
64fdec7f17
  1. 14
      app/services/imports/case_logs_import_service.rb

14
app/services/imports/case_logs_import_service.rb

@ -342,13 +342,15 @@ module Imports
def age_known(xml_doc, index, hhmemb) def age_known(xml_doc, index, hhmemb)
return nil if hhmemb.present? && index > hhmemb return nil if hhmemb.present? && index > hhmemb
age_refused = string_or_nil(xml_doc, "P#{index}AR") age_refused = string_or_nil(xml_doc, "P#{index}AR")
if age_refused == "AGE_REFUSED" if age_refused.present?
1 # No if age_refused.upcase == "AGE_REFUSED"
else return 1 # No
0 # Yes else
return 0 # Yes
end
end end
0
end end
def details_known(index, attributes) def details_known(index, attributes)
@ -500,7 +502,7 @@ module Imports
end end
def people_with_details(xml_doc) def people_with_details(xml_doc)
((2..8).map { |x| string_or_nil(xml_doc, "P#{x}Rel") } + [string_or_nil(xml_doc, "P1Age")]).compact ((2..8).map { |x| string_or_nil(xml_doc, "P#{x}Rel") } + [string_or_nil(xml_doc, "P1Sex")]).compact
end end
end end
end end

Loading…
Cancel
Save