Browse Source

Add default mappings

pull/1560/head
Kat 3 years ago
parent
commit
a3828e0bc7
  1. 7
      app/services/imports/sales_logs_import_service.rb

7
app/services/imports/sales_logs_import_service.rb

@ -576,8 +576,6 @@ module Imports
attributes["sex1"] ||= "R" attributes["sex1"] ||= "R"
attributes["ethnic_group"] ||= 17 attributes["ethnic_group"] ||= 17
attributes["ethnic"] ||= 17 attributes["ethnic"] ||= 17
# attributes["ethnic_group2"] ||= 17
# attributes["ethnicbuy2"] ||= 17
attributes["national"] ||= 13 attributes["national"] ||= 13
attributes["ecstat1"] ||= 10 attributes["ecstat1"] ||= 10
attributes["income1nk"] ||= attributes["income1"].present? ? 0 : 1 attributes["income1nk"] ||= attributes["income1"].present? ? 0 : 1
@ -591,6 +589,11 @@ module Imports
attributes["relat2"] ||= "R" attributes["relat2"] ||= "R"
attributes["inc2mort"] ||= 3 attributes["inc2mort"] ||= 3
attributes["buy2livein"] ||= 1 unless attributes["ownershipsch"] == 3 attributes["buy2livein"] ||= 1 unless attributes["ownershipsch"] == 3
if attributes["saledate"] >= Time.zone.local(2023, 4, 1)
attributes["ethnic_group2"] ||= 17
attributes["ethnicbuy2"] ||= 17
attributes["nationalbuy2"] ||= 13
end
end end
# other household members characteristics # other household members characteristics

Loading…
Cancel
Save