Skip to content

Commit

Permalink
Update django_mailbox/models.py
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Fouque <pfouque@users.noreply.github.com>
  • Loading branch information
Pietro395 and pfouque authored Dec 26, 2023
1 parent 21faa22 commit 7570a0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_mailbox/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,9 @@ def __getitem__(self, name):
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:
Expand Down

0 comments on commit 7570a0d

Please sign in to comment.