diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-11-18 14:05:56 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-11-18 14:35:21 +0000 |
commit | 5b3731b263864722f26c4ab9ce28209b089a6942 (patch) | |
tree | a3c8066d786f19b684677af5685fd587bf193ab7 /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | 7b3c6513022a76409ae175187ecfb8064cff6e0d (diff) |
Remove cached photos before updating db field.
If the photo field is updated first, then the cache removal
doesn't think there are any photos to remove.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 975fed02f..64cc9eaaf 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -472,8 +472,8 @@ sub _get_remove_photo_param : Private { sub remove_photo : Private { my ($self, $c, $object, $keys) = @_; if ($keys eq 'ALL') { - $object->photo(undef); $object->get_photoset->delete_cached; + $object->photo(undef); } else { my $fileids = $object->get_photoset->remove_images($keys); $object->photo($fileids); |