aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-08-21 09:22:34 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-08-21 09:22:34 +0100
commitf3649ee94bb80e8b33f0eea8a817760475157b3b (patch)
tree7e55489c816ef646d94a9dd1a9e8aca2f0e54e30 /perllib/Open311.pm
parente51bb2af37fbfe6efd3fad9a79e51010f6cad1aa (diff)
Make sure Open311 passed coordinate is decimal.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 69c946004..0b44575db 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -11,6 +11,7 @@ use DateTime::Format::W3CDTF;
use HTTP::Request::Common qw(POST);
use FixMyStreet::Cobrand;
use FixMyStreet::DB;
+use Utils;
has jurisdiction => ( is => 'ro', isa => Str );;
has api_key => ( is => 'ro', isa => Str );
@@ -121,8 +122,8 @@ sub _populate_service_request_params {
|| ( !$self->send_notpinpointed && !$problem->used_map
&& !$problem->postcode ) )
{
- $params->{lat} = $problem->latitude;
- $params->{long} = $problem->longitude;
+ $params->{lat} = Utils::truncate_coordinate($problem->latitude);
+ $params->{long} = Utils::truncate_coordinate($problem->longitude);
# this is a special case for sending to Bromley so they can
# report accuracy levels correctly. We include easting and
# northing as attributes elsewhere.