aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-03 18:06:20 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-10 16:53:16 +0000
commit57e5cd72ed7fe2f8b9c72a1390a7ad37fd5cfcc2 (patch)
tree7ea5d74e16d1ce64d02af4a381c039c4ae3e3af5
parent45186b5f25cc6ece26c5d7d92a78ab2b75f6d05b (diff)
Allow superuser to leave update when inspecting.
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 35d7afd5b..7cd9d32a0 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -419,12 +419,13 @@ sub inspect : Private {
if (my $saved_at = $c->get_param('saved_at')) {
$timestamp = DateTime->from_epoch( epoch => $saved_at );
}
+ my $name = $c->user->from_body ? $c->user->from_body->name : $c->user->name;
$problem->add_to_comments( {
text => $update_text,
created => $timestamp,
confirmed => $timestamp,
user_id => $c->user->id,
- name => $c->user->from_body->name,
+ name => $name,
state => 'confirmed',
mark_fixed => 0,
anonymous => 0,