diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-10-09 22:50:49 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-10-09 22:50:49 +1100 |
commit | 94ae2713d4aca80b7dc1168a60f98bbe38d86e12 (patch) | |
tree | 3cb6702ba2b39a2e9a0a92208bf695d73bdfd0ca /apps/patchwork/models.py | |
parent | 4a039197705f92ee1c362401a7f7bb834ecc9079 (diff) | |
download | patchwork-94ae2713d4aca80b7dc1168a60f98bbe38d86e12.tar.bz2 patchwork-94ae2713d4aca80b7dc1168a60f98bbe38d86e12.tar.xz |
[models] Fix exception on mbox view with non-ascii submitter name
We need to unicode the name instead of str-ing it.
Add test.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/models.py')
-rw-r--r-- | apps/patchwork/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 02fb8b4..1da1d99 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -252,7 +252,7 @@ class Patch(models.Model): mail['Subject'] = self.name mail['Date'] = email.utils.formatdate( time.mktime(self.date.utctimetuple())) - mail['From'] = str(self.submitter) + mail['From'] = unicode(self.submitter) mail['X-Patchwork-Id'] = str(self.id) mail.set_unixfrom('From patchwork ' + self.date.ctime()) |