aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-01-02 12:26:52 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-01-03 14:22:31 +0000
commit37624068be8cd9f47b531846236237771f511bdc (patch)
treedb7cc52e156c0b56cbdbf8e615e9a7ea2cd7b319
parentc900b5057c6d3a9c389a0d0ac8524ab2e3abd8f8 (diff)
Prefetch translations in /reports list of bodies.
-rw-r--r--CHANGELOG.md1
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e7fade45..bfa76c784 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- Bugfixes:
- Make sure dashboard filters all fit onto one line.
- Fix issue with red bars on bar graph of many categories.
+ - Prefetch translations in /reports list of bodies.
* v2.3 (18th December 2017)
- New features:
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 315cfc074..8550b745b 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -92,7 +92,7 @@ sub index : Path : Args(0) {
$c->stash->{children} = $children;
}
} else {
- my @bodies = $c->model('DB::Body')->active->with_area_count->all_sorted;
+ my @bodies = $c->model('DB::Body')->active->translated->with_area_count->all_sorted;
$c->stash->{bodies} = \@bodies;
}