Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pfouque committed May 24, 2024
1 parent 7337d31 commit 88e17ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions django_mailbox/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,10 @@ def reply(self, message):
EmailMessage(subject="pong", body="pongpong")
)
"""
if not isinstance(message, EmailMessage):
raise ValueError('Message must be an instance of email.Message')
from django.core.mail import EmailMessage as DjangoEmailMessage

if not isinstance(message, DjangoEmailMessage):
raise ValueError('Message must be an instance of django.core.mail.EmailMessage')

if not message.from_email:
if self.mailbox.from_email:
Expand Down

0 comments on commit 88e17ea

Please sign in to comment.