Skip to content

Commit

Permalink
Merge pull request #29 from plone/mtrebron-unicode
Browse files Browse the repository at this point in the history
Ensure error message is an unicode object and not utf-8 bytestring
  • Loading branch information
gforcada authored Apr 14, 2017
2 parents 492575e + f104e9f commit 05dffda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ New features:

Bug fixes:

- *add item here*
- Ensure error message is an unicode object
[mtrebron]


4.0.14 (2017-04-02)
Expand Down
3 changes: 2 additions & 1 deletion plone/app/contentrules/actions/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def __call__(self):
def error(self, obj, error):
request = getattr(self.context, 'REQUEST', None)
if request is not None:
title = utils.pretty_title_or_id(obj, obj)
title = utils.safe_unicode(utils.pretty_title_or_id(obj, obj))
error = utils.safe_unicode(error)
message = _(
u"Unable to change state of ${name} as part of content rule 'workflow' action: ${error}", # noqa
mapping={'name': title, 'error': error})
Expand Down

0 comments on commit 05dffda

Please sign in to comment.