diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-14 10:36:45 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-14 10:36:45 +0100 |
commit | 17431f583e5362d205f4b6c75be5d11aa17dc97b (patch) | |
tree | 65ae8d7e0b59c48bcfdc7ddc71371fddcff34929 | |
parent | 94b45011bcbd1844077eaa973889eef7ec7ce695 (diff) |
Make sure closest address stringified in extra.
22f0fed0b made the closest address an object, and objects can’t
be directly stored in the extra column.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Oxfordshire.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Rutland.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm index 4b1dbc32c..479d9c43b 100644 --- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm +++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm @@ -144,7 +144,7 @@ sub open311_config { push @$extra, { name => 'external_id', value => $row->id }; if ($h->{closest_address}) { - push @$extra, { name => 'closest_address', value => $h->{closest_address} } + push @$extra, { name => 'closest_address', value => "$h->{closest_address}" } } if ( $row->used_map || ( !$row->used_map && !$row->postcode ) ) { push @$extra, { name => 'northing', value => $h->{northing} }; diff --git a/perllib/FixMyStreet/Cobrand/Rutland.pm b/perllib/FixMyStreet/Cobrand/Rutland.pm index 2e4d434b5..6993b0964 100644 --- a/perllib/FixMyStreet/Cobrand/Rutland.pm +++ b/perllib/FixMyStreet/Cobrand/Rutland.pm @@ -18,7 +18,7 @@ sub open311_config { push @$extra, { name => 'description', value => $row->detail }; if ($h->{closest_address}) { - push @$extra, { name => 'closest_address', value => $h->{closest_address} } + push @$extra, { name => 'closest_address', value => "$h->{closest_address}" } } $row->set_extra_fields( @$extra ); diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index dfe0b190a..84aa851ed 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -48,7 +48,7 @@ sub send { if ($_->{code} eq $id_field) { push @$extra, { name => $id_field, value => $row->id }; } elsif ($_->{code} eq 'closest_address' && $h->{closest_address}) { - push @$extra, { name => $_->{code}, value => $h->{$_->{code}} }; + push @$extra, { name => $_->{code}, value => "$h->{closest_address}" }; } elsif ($_->{code} =~ /^(easting|northing)$/) { # NB If there's ever a cobrand with always_send_latlong=0 and # send_notpinpointed=0 then this line will need changing to |