Opened 6 years ago
Last modified 6 years ago
#31574 closed Bug
BUG: EmailMessage cannot mix tuples and lists as arguments — at Version 1
| 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.
Note:
See TracTickets
for help on using tickets.