diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 10:33:26 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 10:33:26 +0100 |
commit | 99496178acf7ac73d0cc1662d2b8ea4640feede4 (patch) | |
tree | dec9d884a839be70b675986b3e9a14ac10a7b3b6 | |
parent | e1a078d41d5b3be4fd45f2fdcedef69d8660dac7 (diff) |
Interval might not always be set.
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 589745dff..b1b1e00a4 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -129,7 +129,8 @@ sub around_map { latitude => { '>=', $min_lat, '<', $max_lat }, longitude => { '>=', $min_lon, '<', $max_lon }, }; - $q->{'current_timestamp - lastupdate'} = { '<', \"'$interval'::interval" }; + $q->{'current_timestamp - lastupdate'} = { '<', \"'$interval'::interval" } + if $interval; my @problems = mySociety::Locale::in_gb_locale { $rs->search( $q, $attr )->all }; return \@problems; |