aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-09 09:44:08 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-09 09:44:08 +0100
commitc25332f3c0a6201726882c9d5b69bf314b5d061d (patch)
tree71a047bf42a22fab0ea3dd076490ef45510605c3 /perllib/FixMyStreet/App/Controller/Report.pm
parent47b754d7a8dd1114eb745efcaf1495fb27f0c1d8 (diff)
parent332c92ead825503c0540f805a0fdb39c64212c15 (diff)
Merge branch 'photo-caching'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 7f798f4f4..f2f411635 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -435,7 +435,7 @@ sub inspect : Private {
$problem->confirmed( \'current_timestamp' );
}
if ( $problem->state eq 'hidden' ) {
- $problem->get_photoset->delete_cached;
+ $problem->get_photoset->delete_cached(plus_updates => 1);
}
if ( $problem->state eq 'duplicate') {
if (my $duplicate_of = $c->get_param('duplicate_of')) {
@@ -477,6 +477,9 @@ sub inspect : Private {
}
$problem->non_public($c->get_param('non_public') ? 1 : 0);
+ if ($problem->non_public) {
+ $problem->get_photoset->delete_cached(plus_updates => 1);
+ }
if ( !$c->forward( '/admin/report_edit_location', [ $problem ] ) ) {
# New lat/lon isn't valid, show an error