Permalink
Browse files

Merge pull request #1355 from internetarchive/hotfix/unbreak-redirects

fix processor: setting v2 breaks for redirects
  • Loading branch information...
mekarpeles committed Oct 16, 2018
2 parents 4d89137 + 9e20e24 commit ba34fd311c03a7448971d2d739be809939bdae21
Showing with 1 addition and 1 deletion.
  1. +1 −1 openlibrary/core/processors/readableurls.py
@@ -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

0 comments on commit ba34fd3

Please sign in to comment.