aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Roles/ContactExtra.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Roles/ContactExtra.pm')
-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,
};