diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-13 21:23:58 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-15 00:11:06 +0000 |
commit | bb356c880412db8bad655e081ad6d68f25ae3ff7 (patch) | |
tree | b2fa2411524b68bd0eb88632951e87f665ad1c27 | |
parent | 40fa72eefc47cf5356d719d6b3b85d22c6937fb8 (diff) |
Don't try and look up something if we have nothing.
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 16eca144d..a0ce9e4a7 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -305,7 +305,7 @@ sub send_reports { my ($bodies, $missing) = $row->bodies_str =~ /^([\d,]+)(?:\|(\d+))?/; my @bodies = split(/,/, $bodies); $bodies = FixMyStreet::App->model("DB::Body")->search({ id => \@bodies }); - $missing = FixMyStreet::App->model("DB::Body")->find($missing); + $missing = FixMyStreet::App->model("DB::Body")->find($missing) if $missing; my @dear; while (my $body = $bodies->next) { |