aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-06-22 12:56:37 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-06-22 13:43:27 +0100
commitd268f042ce441485b3512308055f37bd08c63588 (patch)
tree3d58ded28da73a38c2b31dc7c9a14ef2edb72694 /perllib/FixMyStreet/App/Controller/Report.pm
parentbbeb8db833e20bf956bd04700f7c6123e942c92d (diff)
Allow inspector to unset priority.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index f5d7db069..669d3c41f 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -462,8 +462,12 @@ sub inspect : Private {
}
# Updating priority must come after category, in case category has changed (and so might have priorities)
- if ($c->get_param('priority') && ($permissions->{report_inspect} || $permissions->{report_edit_priority})) {
- $problem->response_priority( $problem->response_priorities->find({ id => $c->get_param('priority') }) );
+ if ($permissions->{report_inspect} || $permissions->{report_edit_priority}) {
+ if ($c->get_param('priority')) {
+ $problem->response_priority( $problem->response_priorities->find({ id => $c->get_param('priority') }) );
+ } else {
+ $problem->response_priority(undef);
+ }
}
if ($valid) {