1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix string repr for ContactAssignment

This commit is contained in:
jeremystretch
2021-10-18 16:47:49 -04:00
parent b44a5ea609
commit 554b44b9f2

View File

@@ -262,4 +262,6 @@ class ContactAssignment(ChangeLoggedModel):
unique_together = ('content_type', 'object_id', 'contact', 'role', 'priority')
def __str__(self):
return f"{self.contact} ({self.get_priority_display()})" if self.priority else self.name
if self.priority:
return f"{self.contact} ({self.get_priority_display()})"
return str(self.contact)