diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-30 17:34:01 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-30 17:34:01 +0100 |
commit | 435b09e7b908afa224a6e972c33379fb6c756b1f (patch) | |
tree | 7087d29f41ff694a8c4bb9afd529d8104cbde4f0 /perllib/FixMyStreet/Geocode/Bing.pm | |
parent | d3159038445f2b78915abfbe4ec07fcd99cedf06 (diff) |
Make sure postalCode is present in result.
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Bing.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index 99197a5f9..4ba00dbfe 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -62,7 +62,7 @@ sub string { # Getting duplicate, yet different, results from Bing sometimes next if @valid_locations - && $valid_locations[-1]{address}{postalCode} eq $_->{address}{postalCode} + && $_->{address}{postalCode} && $valid_locations[-1]{address}{postalCode} eq $_->{address}{postalCode} && ( $valid_locations[-1]{address}{locality} eq $_->{address}{adminDistrict2} || $valid_locations[-1]{address}{adminDistrict2} eq $_->{address}{locality} || $valid_locations[-1]{address}{locality} eq $_->{address}{locality} |