diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-02-21 13:24:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-02-28 12:06:41 +0000 |
commit | 7ecd4513cc9703fa27b1f521a1fc443cc9a3ca33 (patch) | |
tree | 193ddc32da09ed5387c43f458003c44567ba2b55 /perllib/FixMyStreet | |
parent | bb0473577998ff275a3f28b279a74948dc2ef044 (diff) |
Assume photo ID given in database exists on disk.
The list code was checking the photo ID given in the database existed on
disk – this shouldn't ever not be the case, and if it was, all that
would happen would be a broken image when the full photo code looks for
it (this is only for e.g. lists of reports).
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Model/PhotoSet.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index 46e1fb630..04521b5ce 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -191,12 +191,7 @@ has ids => ( # Arrayref of $fileid tuples (always, so post upload/raw data proc $type ||= 'jpeg'; if ($fileid && length($fileid) == 40) { my $file = $self->get_file($fileid, $type); - if ($file->exists) { - $file->basename; - } else { - warn "File $part doesn't exist"; - (); - } + $file->basename; } else { # A bad hash, probably a bot spamming with bad data. (); |