Skip to content

Commit bfd1adf

Browse files
Fixes #20441: Fix display of the "groups" column in contact assignments table (#20446)
1 parent 030f03b commit bfd1adf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

netbox/tenancy/tables/contacts.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ class ContactAssignmentTable(NetBoxTable):
110110
verbose_name=_('Role'),
111111
linkify=True
112112
)
113-
contact_group = tables.Column(
114-
accessor=Accessor('contact__group'),
115-
verbose_name=_('Group'),
116-
linkify=True
113+
contact_groups = columns.ManyToManyColumn(
114+
accessor=Accessor('contact__groups'),
115+
verbose_name=_('Groups'),
116+
linkify_item=('tenancy:contactgroup', {'pk': tables.A('pk')})
117117
)
118118
contact_title = tables.Column(
119119
accessor=Accessor('contact__title'),
@@ -152,7 +152,7 @@ class Meta(NetBoxTable.Meta):
152152
model = ContactAssignment
153153
fields = (
154154
'pk', 'object_type', 'object', 'contact', 'role', 'priority', 'contact_title', 'contact_phone',
155-
'contact_email', 'contact_address', 'contact_link', 'contact_description', 'contact_group', 'tags',
155+
'contact_email', 'contact_address', 'contact_link', 'contact_description', 'contact_groups', 'tags',
156156
'actions'
157157
)
158158
default_columns = (

0 commit comments

Comments
 (0)