diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 9cbaef6c2..4af6f80cd 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -551,9 +551,8 @@ sub body { if ($problem->external_body) { $body = $problem->external_body; } else { - (my $council = $problem->council) =~ s/\|.*//g; - my @councils = split( /,/, $council ); - my $areas_info = mySociety::MaPit::call('areas', \@councils); + my $councils = $problem->councils; + my $areas_info = mySociety::MaPit::call('areas', $councils); $body = join( _(' and '), map { my $name = $areas_info->{$_}->{name}; @@ -564,7 +563,7 @@ sub body { } else { $name; } - } @councils + } @$councils ); } return $body; |