aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Around.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index bdf381294..184d61f4f 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -228,7 +228,7 @@ sub check_and_stash_category : Private {
my @bodies = $c->model('DB::Body')->active->for_areas(keys %$all_areas)->all;
my %bodies = map { $_->id => $_ } @bodies;
- my @contacts = $c->model('DB::Contact')->not_deleted->search(
+ my @categories = $c->model('DB::Contact')->not_deleted->search(
{
body_id => [ keys %bodies ],
},
@@ -238,9 +238,8 @@ sub check_and_stash_category : Private {
distinct => 1
}
)->all;
- my @categories = map { { name => $_->category, value => $_->category_display } } @contacts;
$c->stash->{filter_categories} = \@categories;
- my %categories_mapped = map { $_->{name} => 1 } @categories;
+ my %categories_mapped = map { $_->category => 1 } @categories;
my $categories = [ $c->get_param_list('filter_category', 1) ];
my %valid_categories = map { $_ => 1 } grep { $_ && $categories_mapped{$_} } @$categories;