diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 61218448b..4762e6f07 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -288,9 +288,9 @@ sub load_and_group_problems : Private { state => [ 'confirmed', 'fixed' ] }; if ($c->stash->{ward}) { - $where->{areas} = { 'like', '%' . $c->stash->{ward}->{id} . '%' }; # FIXME Check this is secure + $where->{areas} = { 'like', '%,' . $c->stash->{ward}->{id} . ',%' }; } elsif ($c->stash->{council}) { - $where->{areas} = { 'like', '%' . $c->stash->{council}->{id} . '%' }; + $where->{areas} = { 'like', '%,' . $c->stash->{council}->{id} . ',%' }; } my $problems = $c->cobrand->problems->search( $where, |