Browse Source

feat: use -1 for not listed address for extensibility

pull/2278/head
natdeanlewissoftwire 2 years ago
parent
commit
d61e83bdf7
  1. 2
      app/models/form/lettings/questions/address_selection.rb
  2. 2
      app/models/log.rb

2
app/models/form/lettings/questions/address_selection.rb

@ -31,7 +31,7 @@ class Form::Lettings::Questions::AddressSelection < ::Form::Question
"8" => { "value" => values[8] }, "8" => { "value" => values[8] },
"9" => { "value" => values[9] }, "9" => { "value" => values[9] },
"divider" => { "value" => true }, "divider" => { "value" => true },
"10" => { "value" => "The address is not listed, I want to enter the address manually" }, "-1" => { "value" => "The address is not listed, I want to enter the address manually" },
}.freeze }.freeze
end end

2
app/models/log.rb

@ -97,7 +97,7 @@ class Log < ApplicationRecord
self.postcode_full = presenter.postcode self.postcode_full = presenter.postcode
self.county = nil self.county = nil
process_postcode_changes! process_postcode_changes!
elsif address_selection == 10 elsif address_selection == -1
self.uprn_known = 0 self.uprn_known = 0
self.uprn_confirmed = nil self.uprn_confirmed = nil
self.uprn = nil self.uprn = nil

Loading…
Cancel
Save