forked from mirror/django-mailbox
Update django_mailbox/models.py
Co-authored-by: Pascal Fouque <pfouque@users.noreply.github.com>
This commit is contained in:
parent
21faa22404
commit
7570a0d37a
1 changed files with 3 additions and 1 deletions
|
|
@ -881,7 +881,9 @@ class MessageAttachment(models.Model):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.message}: {self.document.url if self.document else None}'
|
if self.document:
|
||||||
|
return f'{self.get_filename()}: {self.document.url}'
|
||||||
|
return self.get_filename()
|
||||||
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue