diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-12 00:10:40 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-06-12 08:22:45 +0100 |
commit | a803781aee299f9cfeb4551ee398701cc053a7a5 (patch) | |
tree | 4aeb950889f5f4ef4808d3408fdf1268f61a0712 | |
parent | 9ac04cfe3ff0102fea0f3bc0c8bae2972c1e05ce (diff) |
[Bexley] Include reports body check on .com.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UK.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm index da0356664..fde5f465a 100644 --- a/perllib/FixMyStreet/Cobrand/UK.pm +++ b/perllib/FixMyStreet/Cobrand/UK.pm @@ -140,6 +140,13 @@ sub find_closest { sub reports_body_check { my ( $self, $c, $code ) = @_; + # Deal with Bexley name not starting with short name + if ($code =~ /bexley/i) { + my $body = $c->model('DB::Body')->search( { name => { -like => "%$code%" } } )->single; + $c->stash->{body} = $body; + return $body; + } + # Manual misspelling redirect if ($code =~ /^rhondda cynon taff$/i) { my $url = $c->uri_for( '/reports/Rhondda+Cynon+Taf' ); |