Django

Code

Changeset 6953

Show
Ignore:
Timestamp:
12/18/07 22:51:35 (1 year ago)
Author:
mtredinnick
Message:

Fixed #6139 -- When sending email, made sure that the "to" and "bcc" sequences have the same type before concatenating.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/mail.py

    r6551 r6953  
    210210        conversions. 
    211211        """ 
    212         self.to = to or [] 
    213         self.bcc = bcc or [] 
     212        if to: 
     213            self.to = list(to) 
     214        else: 
     215            self.to = [] 
     216        if bcc: 
     217            self.bcc = list(bcc) 
     218        else: 
     219            self.bcc = [] 
    214220        self.from_email = from_email or settings.DEFAULT_FROM_EMAIL 
    215221        self.subject = subject