diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-04-01 10:47:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-04-04 17:50:55 +0100 |
commit | 98e61f99be442523fdfb38e95d9a8c2132ea0405 (patch) | |
tree | 4640cacbaf8392cb7c4df332a3a7bc6b19fb7b47 /perllib/FixMyStreet/DB/Result/Body.pm | |
parent | 8ca5583e62b1c24128b8d691a8b5f5236ce99eef (diff) |
Factor to common FixMyStreet::MapIt call.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Body.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index c04c117ae..37164c990 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -134,6 +134,7 @@ __PACKAGE__->rabx_column('extra'); use Moo; use namespace::clean; +use FixMyStreet::MapIt; with 'FixMyStreet::Roles::Translatable', 'FixMyStreet::Roles::Extra'; @@ -182,10 +183,9 @@ sub first_area_children { my $cobrand = $self->result_source->schema->cobrand; - my %params = ( type => $cobrand->area_types_children ); - $params{generation} = FixMyStreet->config('MAPIT_GENERATION') - if FixMyStreet->config('MAPIT_GENERATION'); - my $children = mySociety::MaPit::call('area/children', $body_area->area_id, %params); + my $children = FixMyStreet::MapIt::call('area/children', $body_area->area_id, + type => $cobrand->area_types_children, + ); return $children; } |