aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Contact.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Contact.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Contact.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm
index bc91c84ee..a99915fb4 100644
--- a/perllib/FixMyStreet/DB/Result/Contact.pm
+++ b/perllib/FixMyStreet/DB/Result/Contact.pm
@@ -98,6 +98,13 @@ sub category_display {
$self->translate_column('category');
}
+sub groups {
+ my $self = shift;
+ my $groups = $self->get_extra_metadata('group') || [];
+ $groups = [ $groups ] unless ref $groups eq 'ARRAY';
+ return $groups;
+}
+
sub get_all_metadata {
my $self = shift;
my @metadata = @{$self->get_extra_fields};