Fix unknown contact display
This commit is contained in:
parent
567b2689a1
commit
4e170074b7
3 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% block content %}
|
||||
<div class="message">
|
||||
<div class="metadata">
|
||||
<div class="name">De: {{ message.sender.display_name }}</div>
|
||||
<div class="name">De: {{ message.sender }}</div>
|
||||
<div class="date">{{ message.received_at }}</div>
|
||||
</div>
|
||||
<div class="media">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="content-block">
|
||||
<div class="metadata">
|
||||
<div class="name">De: {{ message.sender.display_name }}</div>
|
||||
<div class="name">De: {{ message.sender }}</div>
|
||||
<div class="date">{{ message.received_at }}</div>
|
||||
</div>
|
||||
<p class="text">{{ message.content | linebreaks }}</p>
|
||||
|
|
Loading…
Reference in a new issue