diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm index 6a94f92e8..8b00d1533 100644 --- a/perllib/FixMyStreet/App/Controller/Photo.pm +++ b/perllib/FixMyStreet/App/Controller/Photo.pm @@ -73,7 +73,9 @@ sub index :LocalRegex('^(c/)?(\d+)(?:\.(full|tn|fp))?\.jpeg$') { $c->detach( 'no_photo' ) unless @photo; - my $photo = $photo[0]->photo; + my $item = $photo[0]; + $c->detach( 'no_photo' ) unless $c->cobrand->allow_photo_display($item); # Should only be for reports, not updates + my $photo = $item->photo; # If photo field contains a hash if (length($photo) == 40) { |