diff --git a/apps/address-service/bin/update-address.js b/apps/address-service/bin/update-address.js index 986626d5ae2..32372509e39 100644 --- a/apps/address-service/bin/update-address.js +++ b/apps/address-service/bin/update-address.js @@ -97,7 +97,7 @@ async function main (args) { console.log(`Address model updated. New address: ${updatedAddressItem.address}`) - const addressSourceItem = await AddressSource.getOne(context, { source: searchString }) + const addressSourceItem = await AddressSource.getOne(context, { source: searchString.toLowerCase() }) if (addressSourceItem) { console.log(`Found address source with id=${addressSourceItem.id}`) diff --git a/apps/address-service/domains/common/utils/services/search/searchServiceUtils.js b/apps/address-service/domains/common/utils/services/search/searchServiceUtils.js index f1c621c8c35..cfb2f8240e3 100644 --- a/apps/address-service/domains/common/utils/services/search/searchServiceUtils.js +++ b/apps/address-service/domains/common/utils/services/search/searchServiceUtils.js @@ -33,7 +33,7 @@ async function createOrUpdateAddressWithSource (context, addressServerUtils, add // Address source // const compoundedAddressSource = mergeAddressAndHelpers(addressSource, helpers) - const addressSourceItem = await addressSourceServerUtils.getOne(context, { source: compoundedAddressSource }) + const addressSourceItem = await addressSourceServerUtils.getOne(context, { source: compoundedAddressSource.toLowerCase() }) if (addressSourceItem) { await addressSourceServerUtils.update(context, addressSourceItem.id, { diff --git a/apps/address-service/index.js b/apps/address-service/index.js index d720a358ca0..417200a2d6e 100644 --- a/apps/address-service/index.js +++ b/apps/address-service/index.js @@ -102,8 +102,8 @@ module.exports = { new SuggestionKeystoneApp(), new SearchKeystoneApp([ new SearchByAddressKey(), - new SearchByInjectionId(), new SearchBySource(), + new SearchByInjectionId(), new SearchByFiasId(), new SearchByGooglePlaceId(), new SearchByProvider(),