diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-05-11 16:06:37 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-05-26 23:02:03 +0100 |
commit | 72809e405e690c88d0e2011802820c9ba215ef61 (patch) | |
tree | d176a6d42a2e6df68324965537c24251c8ca80b1 /perllib/FixMyStreet/App/Controller/Report.pm | |
parent | c6e723a2fee40f7009de3f04de5870693e12889e (diff) |
Consistent use of Contact groups.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 5 |
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; |