Skip to content

Commit

Permalink
Fix UnicodeError in byline
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Aug 18, 2014
1 parent e9d107e commit dff6c00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -2,6 +2,9 @@
0.7 (unreleased)
----------------

- Fix UnicodeError in byline
[pbauer]

- Set a effective_date on auto-publishing notes
[pbauer]

Expand Down
4 changes: 3 additions & 1 deletion src/collective/noticeboard/adapters.py
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from persistent.dict import PersistentDict
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import safe_unicode
from zope.annotation.interfaces import IAnnotations
from zope.component import getMultiAdapter
from zope.interface import implements
Expand Down Expand Up @@ -110,7 +111,8 @@ def author(self):

def authorname(self):
author = self.author()
return author and author['fullname'] or self.creator()
authorname = author['fullname'] if author else self.creator()
return safe_unicode(authorname)

def modified(self):
util = getToolByName(self.context, 'translation_service')
Expand Down

0 comments on commit dff6c00

Please sign in to comment.