Skip to content

Commit 4753edc

Browse files
author
Yamil Asusta
committed
Merge pull request #87 from cbg/fix_unicode_to_names
Fix processing of multiple 'to_name' unicode objects.
2 parents 83853be + 71cf177 commit 4753edc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sendgrid/message.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def add_to_name(self, to_name):
7272
elif sys.version_info < (3, 0) and isinstance(to_name, unicode):
7373
self.to_name.append(to_name.encode('utf-8'))
7474
elif hasattr(to_name, '__iter__'):
75-
self.to_name = self.to_name + to_name
75+
for tn in to_name:
76+
self.add_to_name(tn)
7677

7778
def add_cc(self, cc):
7879
if isinstance(cc, str):

0 commit comments

Comments
 (0)