Browse Source

Update address search results

pull/2981/head
Kat 2 months ago
parent
commit
1b81a9e8a1
  1. 2
      app/controllers/address_search_controller.rb

2
app/controllers/address_search_controller.rb

@ -38,7 +38,7 @@ class AddressSearchController < ApplicationController
address_service.call
uprn_service.call
results = ([uprn_service.result] || []) + (address_service.result || [])
results = (uprn_service.result.present? ? [uprn_service.result] : []) + (address_service.result.compact.any? ? address_service.result : [])
if address_service.error.present? && uprn_service.error.present?
render json: { error: "Address and UPRN are not recognised." }, status: :not_found

Loading…
Cancel
Save