diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-04-01 08:06:51 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-04-01 08:06:52 +0100 |
commit | a978974b5770ebc173d302034cbe179a45cb40d5 (patch) | |
tree | 10c9e1721c9d8e8bd15c0ca6b5d8b56752e4d437 /perllib/FixMyStreet/App/Controller/Admin | |
parent | 83bb5ff481d87e4cc4a713d69e3765d2d2c16392 (diff) |
Make sure MapIt generation always used if given.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin/Bodies.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm index 56bc554e9..1f8840bcb 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm @@ -187,10 +187,14 @@ sub body_form_dropdowns : Private { my $areas; my $whitelist = $c->config->{MAPIT_ID_WHITELIST}; + my %params; + $params{generation} = $c->config->{MAPIT_GENERATION} + if $c->config->{MAPIT_GENERATION}; + if ( $whitelist && ref $whitelist eq 'ARRAY' && @$whitelist ) { - $areas = mySociety::MaPit::call('areas', $whitelist); + $areas = mySociety::MaPit::call('areas', $whitelist, %params); } else { - $areas = mySociety::MaPit::call('areas', $c->cobrand->area_types); + $areas = mySociety::MaPit::call('areas', $c->cobrand->area_types, %params); } # Some cobrands may want to add extra areas at runtime beyond those |