Browse Source

set housingneeds_type to none of the above if no housingneeds selected (#857)

CLDC-1324-remove-not-started-status
kosiakkatrina 2 years ago committed by GitHub
parent
commit
2b06e70302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/services/imports/lettings_logs_import_service.rb

1
app/services/imports/lettings_logs_import_service.rb

@ -113,6 +113,7 @@ module Imports
attributes["housingneeds_type"] = 0 if attributes["housingneeds_a"] == 1
attributes["housingneeds_type"] = 1 if attributes["housingneeds_b"] == 1
attributes["housingneeds_type"] = 2 if attributes["housingneeds_c"] == 1
attributes["housingneeds_type"] = 3 if attributes["housingneeds_f"] == 1 && [attributes["housingneeds_a"], attributes["housingneeds_b"], attributes["housingneeds_c"]].all? { |housingneed| housingneed != 1 }
attributes["housingneeds_other"] = attributes["housingneeds_f"] == 1 ? 1 : 0
attributes["illness"] = unsafe_string_as_integer(xml_doc, "Q10ia")

Loading…
Cancel
Save