Browse Source

Check address options returned is more than 1

Fix-copy-multiple-matches-for-this-address
Manny Dinssa 4 days ago
parent
commit
c71b440b80
  1. 2
      app/services/bulk_upload/lettings/year2024/row_parser.rb
  2. 2
      app/services/bulk_upload/sales/year2024/row_parser.rb

2
app/services/bulk_upload/lettings/year2024/row_parser.rb

@ -616,7 +616,7 @@ private
def validate_address_option_found
if log.uprn.nil? && field_16.blank? && key_address_fields_provided?
error_message = if log.address_options_present?
error_message = if log.address_options_present? && log.address_options.size > 1
I18n.t("#{ERROR_BASE_KEY}.address.not_determined")
else
I18n.t("#{ERROR_BASE_KEY}.address.not_found")

2
app/services/bulk_upload/sales/year2024/row_parser.rb

@ -614,7 +614,7 @@ private
def validate_address_option_found
if log.uprn.nil? && field_22.blank? && key_address_fields_provided?
error_message = if log.address_options_present?
error_message = if log.address_options_present? && log.address_options.size > 1
I18n.t("#{ERROR_BASE_KEY}.address.not_determined")
else
I18n.t("#{ERROR_BASE_KEY}.address.not_found")

Loading…
Cancel
Save