aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Roles
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-06-30 20:08:22 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-06-30 20:08:22 +0100
commitaf5c9769ed7f3d4217d9a5de21cf07aa977737be (patch)
tree84ff5a5050e7d4e2100df9c884c348ea8317464f /perllib/FixMyStreet/Roles
parent30dd9d8bd1f4229bf5cb0a8c559ba00dba35b750 (diff)
parent7b06aae99229d9a5a8544f4aa106682a8c02b497 (diff)
Merge branch 'issues/forcouncils/193-state-of-the-template'
Diffstat (limited to 'perllib/FixMyStreet/Roles')
-rw-r--r--perllib/FixMyStreet/Roles/ContactExtra.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Roles/ContactExtra.pm b/perllib/FixMyStreet/Roles/ContactExtra.pm
index d23a094f3..fc6531e54 100644
--- a/perllib/FixMyStreet/Roles/ContactExtra.pm
+++ b/perllib/FixMyStreet/Roles/ContactExtra.pm
@@ -11,8 +11,9 @@ sub for_bodies {
my $attrs = {
'me.body_id' => $bodies,
};
+ my $order = $rs->can('name_column') ? $rs->name_column() : 'name';
my $filters = {
- order_by => 'name',
+ order_by => $order,
join => { $join_table => 'contact' },
distinct => 1,
};