aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Factories.pm4
-rw-r--r--perllib/FixMyStreet/DB/Result/Body.pm8
2 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/DB/Factories.pm b/perllib/FixMyStreet/DB/Factories.pm
index 4cbab4753..5af9ed38f 100644
--- a/perllib/FixMyStreet/DB/Factories.pm
+++ b/perllib/FixMyStreet/DB/Factories.pm
@@ -199,7 +199,7 @@ sub create_problem {
package FixMyStreet::DB::Factory::Body;
use parent -norequire, "FixMyStreet::DB::Factory::Base";
-use mySociety::MaPit;
+use FixMyStreet::MapIt;
__PACKAGE__->resultset(FixMyStreet::DB->resultset("Body"));
@@ -208,7 +208,7 @@ __PACKAGE__->exclude(['area_id', 'categories']);
__PACKAGE__->fields({
name => __PACKAGE__->callback(sub {
my $area_id = shift->get('area_id');
- my $area = mySociety::MaPit::call('area', $area_id);
+ my $area = FixMyStreet::MapIt::call('area', $area_id);
$area->{name};
}),
body_areas => __PACKAGE__->callback(sub {
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;
}