10491 improve error message for ProtectedError on contact assignment

This commit is contained in:
Arthur 2022-09-30 09:09:21 -07:00
parent 62820ea2b8
commit 02ffc2ddee

View File

@ -163,8 +163,8 @@ class ContactAssignment(WebhooksMixin, ChangeLoggedModel):
def __str__(self):
if self.priority:
return f"{self.contact} ({self.get_priority_display()})"
return str(self.contact)
return f"{self.contact} ({self.get_priority_display()}) -> {self.object}"
return str(f"{self.contact} -> {self.object}")
def get_absolute_url(self):
return reverse('tenancy:contact', args=[self.contact.pk])