Skip to content

Commit

Permalink
fix issue#113. missed personalization dicts (#114)
Browse files Browse the repository at this point in the history
fix missed personalization dicts caused by type(personalization) == Dict
  • Loading branch information
alichass authored Dec 22, 2022
1 parent e631f1a commit 22b938c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sendgrid_backend/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ def _build_sg_mail(self, msg: EmailMessage) -> Dict:

if hasattr(msg, "personalizations"):
for personalization in msg.personalizations:
if type(personalization) == Dict:
if isinstance(personalization, Dict):
personalization = dict_to_personalization(personalization)

assert type(personalization) == Personalization
assert isinstance(personalization, Personalization)

mail.add_personalization(
self._build_sg_personalization(
Expand Down

0 comments on commit 22b938c

Please sign in to comment.