Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed May 2, 2024
1 parent 670585a commit 02f868c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/eletter/classes.py
Expand Up @@ -830,7 +830,9 @@ def _compile(self) -> EmailMessage:
if self.content_id is not None:
msg["Content-ID"] = self.content_id
if ctype is None:
ctype = msg.get_payload()[0].get_content_type()
rel1 = msg.get_payload(0)
assert isinstance(rel1, EmailMessage)
ctype = rel1.get_content_type()
msg.set_param("type", ctype)
if self.start is not None:
msg.set_param("start", self.start)
Expand Down

0 comments on commit 02f868c

Please sign in to comment.