Opened 5 years ago

Last modified 5 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 Joe Huang)

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 (1)

comment:1 by Joe Huang, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top