diff --git a/apps/condo/domains/property/hooks/useImporterFunctions.tsx b/apps/condo/domains/property/hooks/useImporterFunctions.tsx index 43f9b1ca257..df55566b705 100644 --- a/apps/condo/domains/property/hooks/useImporterFunctions.tsx +++ b/apps/condo/domains/property/hooks/useImporterFunctions.tsx @@ -81,8 +81,7 @@ export const useImporterFunctions = (): [Columns, RowNormalizer, RowValidator, O const [address] = row const suggestions = await addressApi.getSuggestions(String(address.value)) - let suggestion = get(suggestions, ['suggestions', 0], null) - if (get(suggestion, 'value') !== get(address, 'value')) suggestion = null + const suggestion = get(suggestions, ['suggestions', 0], null) const suggestionType = get(suggestion, 'type') const houseTypeFull = get(suggestion, ['data', 'house_type_full']) diff --git a/packages/keystone/plugins/addressService.js b/packages/keystone/plugins/addressService.js index 7acef06d622..fe3df3d657d 100644 --- a/packages/keystone/plugins/addressService.js +++ b/packages/keystone/plugins/addressService.js @@ -143,16 +143,16 @@ const addressService = ({ addressFields['addressKey'] = get(result, 'addressKey') addressFields['addressSources'] = get(result, 'addressSources', []) } else { - const msg = `No address found by string "${addressToSearch}"` logger.error({ - msg, + msg: 'No address found by string', + addressToSearch, operation, listKey, itemId: get(existingItem, 'id'), addressKey: get(existingItem, 'addressKey'), }) - throw new Error(msg) + throw new Error(`No address found by string "${addressToSearch}"`) } } else { // NOTE(pahaz): if you don't need to change the address you want to prevent any changes