From 4e170074b742f11b0be06e590f45d72a7165e6da Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 14 Feb 2021 19:17:26 +0100 Subject: [PATCH] Fix unknown contact display --- src/pictures/models.py | 2 +- src/pictures/templates/pictures/messages-detail.html | 2 +- src/pictures/templates/pictures/messages-list.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pictures/models.py b/src/pictures/models.py index 5d22c95..e6c275a 100644 --- a/src/pictures/models.py +++ b/src/pictures/models.py @@ -16,7 +16,7 @@ class Contact(models.Model): display_name = models.CharField(max_length=250, blank=True) def __str__(self): - return self.display_name or self.phone_number + return self.display_name or str(self.phone_number) class Message(models.Model): diff --git a/src/pictures/templates/pictures/messages-detail.html b/src/pictures/templates/pictures/messages-detail.html index af11990..546149f 100644 --- a/src/pictures/templates/pictures/messages-detail.html +++ b/src/pictures/templates/pictures/messages-detail.html @@ -13,7 +13,7 @@ {% block content %}
diff --git a/src/pictures/templates/pictures/messages-list.html b/src/pictures/templates/pictures/messages-list.html index b53db1e..fef66b1 100644 --- a/src/pictures/templates/pictures/messages-list.html +++ b/src/pictures/templates/pictures/messages-list.html @@ -17,7 +17,7 @@

{{ message.content | linebreaks }}