Skip to content

Commit

Permalink
Merge pull request #283 from Pietro395/master
Browse files Browse the repository at this point in the history
MessageAttachment __str__ change
  • Loading branch information
Pietro395 authored Dec 27, 2023
2 parents dd37322 + 7570a0d commit 592126c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_mailbox/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,10 @@ def __getitem__(self, name):
return value

def __str__(self):
return self.document.url
if self.document:
return f'{self.get_filename()}: {self.document.url}'
return self.get_filename()


class Meta:
verbose_name = _('Message attachment')
Expand Down

0 comments on commit 592126c

Please sign in to comment.