aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-05-11 16:06:37 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-05-26 23:02:03 +0100
commit72809e405e690c88d0e2011802820c9ba215ef61 (patch)
treed176a6d42a2e6df68324965537c24251c8ca80b1 /perllib/FixMyStreet/App/Controller/Report.pm
parentc6e723a2fee40f7009de3f04de5870693e12889e (diff)
Consistent use of Contact groups.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 8a6047194..4d8794c59 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -703,9 +703,8 @@ sub stash_category_groups : Private {
my %category_groups = ();
for my $category (@$contacts) {
- my $group = $category->{group} // $category->get_extra_metadata('group') // [''];
- # this could be an array ref or a string
- my @groups = ref $group eq 'ARRAY' ? @$group : ($group);
+ my $group = $category->{group} // $category->groups;
+ my @groups = @$group;
if (scalar @groups > 1 && $combine_multiple) {
@groups = sort @groups;
$category->{group} = \@groups;