diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Nearby.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Nearby.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm index a6b00ef7b..9db1c6525 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm @@ -4,6 +4,11 @@ use base 'DBIx::Class::ResultSet'; use strict; use warnings; +sub to_body { + my ($rs, $bodies) = @_; + return FixMyStreet::DB::ResultSet::Problem::to_body($rs, $bodies, 1); +} + sub nearby { my ( $rs, $c, $dist, $ids, $limit, $mid_lat, $mid_lon, $interval, $category, $states ) = @_; @@ -21,7 +26,7 @@ sub nearby { if $ids; $params->{category} = $category if $category; - $rs = FixMyStreet::DB::ResultSet::Problem::to_body($rs, $c->cobrand->body_restriction); + $rs = $c->cobrand->problems_restriction($rs); my $attrs = { prefetch => 'problem', |