Browse Source

Add age1 and age1_known to bulk upload

remotes/origin/bulk-upload-errors-integration
Kat 3 years ago
parent
commit
3636dba7c8
  1. 4
      app/services/bulk_upload/lettings/row_parser.rb
  2. 3
      spec/services/bulk_upload/lettings/row_parser_spec.rb

4
app/services/bulk_upload/lettings/row_parser.rb

@ -230,6 +230,8 @@ private
startertenancy: %i[field_8],
tenancy: %i[field_9],
declaration: %i[field_132],
age1_known: %i[field_12],
age1: %i[field_12],
}
end
@ -301,6 +303,8 @@ private
attributes["startertenancy"] = field_8
attributes["tenancy"] = field_9
attributes["declaration"] = field_132
attributes["age1_known"] = field_12.present? ? 0 : 1
attributes["age1"] = field_12
attributes
end

3
spec/services/bulk_upload/lettings/row_parser_spec.rb

@ -68,7 +68,8 @@ RSpec.describe BulkUpload::Lettings::RowParser do
field_133: "1",
field_8: "1",
field_9: "2",
field_132: "1"
field_132: "1",
field_12: "22"
}
end

Loading…
Cancel
Save