1
0
Fork 0

Update django_mailbox/models.py

Co-authored-by: Pascal Fouque <pfouque@users.noreply.github.com>
This commit is contained in:
Pietro 2023-12-27 00:40:48 +01:00 committed by GitHub
parent 21faa22404
commit 7570a0d37a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -881,7 +881,9 @@ class MessageAttachment(models.Model):
return value
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: