aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm b/perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm
index 96f7cf7a0..af605afa6 100644
--- a/perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/ResponsePriority.pm
@@ -12,8 +12,12 @@ sub join_table {
}
sub map_extras {
- my ($rs, @ts) = @_;
- return map { { id => $_->id, name => $_->name } } @ts;
+ my ($rs, $params, @ts) = @_;
+ my $current = $params->{problem} && $params->{problem}->response_priority_id || 0;
+ return
+ map { { id => $_->id, name => $_->name } }
+ grep { !$_->deleted || $_->id == $current }
+ @ts;
}
1;