aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Body.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm
index 3c013378c..c04c117ae 100644
--- a/perllib/FixMyStreet/DB/Result/Body.pm
+++ b/perllib/FixMyStreet/DB/Result/Body.pm
@@ -181,9 +181,11 @@ sub first_area_children {
return unless $body_area;
my $cobrand = $self->result_source->schema->cobrand;
- my $children = mySociety::MaPit::call('area/children', $body_area->area_id,
- type => $cobrand->area_types_children,
- );
+
+ 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);
return $children;
}