aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index dd7abc563..991064f55 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -554,6 +554,12 @@ sub inspect : Private {
$c->cobrand->call_hook(report_inspect_update_extra => $problem);
+ $c->forward('/photo/process_photo');
+ if ( my $photo_error = delete $c->stash->{photo_error} ) {
+ $valid = 0;
+ push @{ $c->stash->{errors} }, $photo_error;
+ }
+
if ($valid) {
$problem->lastupdate( \'current_timestamp' );
$problem->update;
@@ -574,6 +580,7 @@ sub inspect : Private {
created => $timestamp,
confirmed => $timestamp,
user => $c->user->obj,
+ photo => $c->stash->{upload_fileid} || undef,
%update_params,
} );
}