aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Problem.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-10 14:18:31 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-10 14:18:33 +0000
commitcdd042f4f3ffdfccae6ff9949cc600d63989939c (patch)
tree24eb2fb7673246fb73daee792a0a715cf59b5a12 /perllib/FixMyStreet/DB/ResultSet/Problem.pm
parent64dd1e896e20f48f3656e0f1fba3779106f2028e (diff)
Check cached reports have photos before showing.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index ce64f7ee9..676e721c2 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -154,7 +154,7 @@ sub _recent {
# Need to reattach schema so that confirmed column gets reinflated.
$probs->[0]->result_source->schema( $rs->result_source->schema ) if $probs->[0];
# Catch any cached ones since hidden
- $probs = [ grep { ! $_->is_hidden } @$probs ];
+ $probs = [ grep { $_->photo && ! $_->is_hidden } @$probs ];
} else {
$probs = [ $rs->search( $query, $attrs )->all ];
Memcached::set($key, $probs, 3600);