diff options
author | Struan Donald <struan@exo.org.uk> | 2012-08-30 18:42:48 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-08-30 18:42:48 +0100 |
commit | 8e1336875a074adb7f906651233931e0ea4c22b7 (patch) | |
tree | 427bb3c33bb5aa5f10cbb776c66a28b3f8195ea7 /perllib/Open311.pm | |
parent | 7a5fed80a9b945b6cee6b034f26518d19751e61a (diff) |
If we don't get a request_id or it's not a text element then regard
posting the service request as having failed
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index aa0e64b53..6d218131f 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -65,7 +65,11 @@ sub send_service_request { if ( $obj ) { if ( $obj->{ request }->{ service_request_id } ) { - return $obj->{ request }->{ service_request_id }; + my $request_id = $obj->{request}->{service_request_id}; + + unless ( ref $request_id ) { + return $request_id; + } } else { my $token = $obj->{ request }->{ token }; if ( $token ) { |