Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageAttachment __str__ change #283

Merged
merged 20 commits into from
Dec 27, 2023
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