Opened 6 years ago
Closed 6 years ago
#31574 closed Bug (worksforme)
EmailMessage.cc/to/bcc cannot mix tuples and lists as arguments.
| Reported by: | Joe Huang | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Mail) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
EmailMessage has fields to, cc, and bcc that can be either tuples or lists. However, mixing tuples and lists errors at this method:
def recipients(self):
return [email for email in (self.to + self.cc + self.bcc) if email]
Lists and tuples can't be added together.
Change History (2)
comment:1 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 6 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
| Summary: | BUG: EmailMessage cannot mix tuples and lists as arguments → EmailMessage.cc/to/bcc cannot mix tuples and lists as arguments. |
| Version: | 3.0 → master |
Note:
See TracTickets
for help on using tickets.
Mixing list and tuples works for me. We cast them to lists in
EmailMessage.__init__().