Browse Source

Refactor

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

2
app/controllers/address_search_controller.rb

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

Loading…
Cancel
Save