aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-03-26 17:31:57 +0100
committerStruan Donald <struan@exo.org.uk>2012-03-26 17:31:57 +0100
commit592149f0659620ddc0fd6ae4ccdea10b9598739b (patch)
tree687ac248ca86b9b828fbb8eee05515a820ef9da9
parentd79fc400538b7694c55ec5db2a7137f9b0f7a21c (diff)
if there is no request_id then skip as we will no be able to work out what to do with it
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index 6865a61f5..dc8fb7672 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -15,6 +15,10 @@ sub update_comments {
for my $request (@$requests) {
my $request_id = $request->{service_request_id};
+ # If there's no request id then we can't work out
+ # what problem it belongs to so just skip
+ next unless $request_id;
+
my $problem =
FixMyStreet::App->model('DB::Problem')
->search( {