Mercurial > piecrust2
changeset 661:2f780b191541
internal: Fix a bug with registering taxonomy terms that are not strings.
Some objects, like the blog data provider's taxnonomy entries, can render as
strings, but are objects themselves. When registering them as "used terms", we
need to use their string representation.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 01 Mar 2016 22:26:09 -0800 |
parents | 9f391ab1b4e0 |
children | cbd5cdec0695 |
files | piecrust/routing.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/routing.py Sat Feb 27 22:00:52 2016 -0800 +++ b/piecrust/routing.py Tue Mar 01 22:26:09 2016 -0800 @@ -330,9 +330,9 @@ # We need to register this use of a taxonomy term. if len(values) == 1: - registered_values = values[0] + registered_values = str(values[0]) else: - registered_values = tuple(values) + registered_values = tuple([str(v) for v in values]) eis = self.app.env.exec_info_stack cpi = eis.current_page_info.render_ctx.current_pass_info if cpi: