Browse Source

Merge branch 'fix_confidence_score_testing' of github.com:pelias/api into fix_confidence_score_testing

pull/378/head
Peter Johnson 9 years ago
parent
commit
effa0ee494
  1. 3
      middleware/confidenceScore.js

3
middleware/confidenceScore.js

@ -100,7 +100,8 @@ function checkForDealBreakers(req, hit) {
return true;
}
if (check.assigned(req.clean.parsed_text.postalcode) && req.clean.parsed_text.postalcode !== hit.address.zip) {
if (check.assigned(req.clean.parsed_text.postalcode) && check.assigned(hit.address) &&
req.clean.parsed_text.postalcode !== hit.address.zip) {
logger.debug('[confidence][deal-breaker]: postalcode !== zip (' + req.clean.parsed_text.postalcode + ' !== ' + hit.address.zip + ')');
return true;
}

Loading…
Cancel
Save