Skip to content

Commit

Permalink
Merge pull request #1355 from internetarchive/hotfix/unbreak-redirects
Browse files Browse the repository at this point in the history
fix processor: setting v2 breaks for redirects
  • Loading branch information
mekarpeles committed Oct 16, 2018
2 parents 4d89137 + 9e20e24 commit ba34fd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openlibrary/core/processors/readableurls.py
Expand Up @@ -44,7 +44,7 @@ def __call__(self, handler):
web.ctx.fullpath = web.ctx.path + web.ctx.query
out = handler()
V2_TYPES = ['works', 'books']
if any(web.ctx.path.startswith('/%s/' % _type) for _type in V2_TYPES):
if out and any(web.ctx.path.startswith('/%s/' % _type) for _type in V2_TYPES):
out.v2 = True
return out

Expand Down

0 comments on commit ba34fd3

Please sign in to comment.