Skip to content

Commit

Permalink
[website_seo_redirection][FIX] Avoid some weird 403 errors.
Browse files Browse the repository at this point in the history
This hopefully fixes OCA#222.
  • Loading branch information
yajo authored and pedrobaeza committed Aug 18, 2016
1 parent 711911f commit 7b5e85f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website_seo_redirection/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def _dispatch(self):
if not hasattr(request, "jsonrequest"):
wsr = request.env["website.seo.redirection"]

# Requests at this point have no user, must remove `env` to force
# Odoo recompute it next time a controller needs it, with its user
del request.env

try:
# Redirect user to SEO version of this URL if possible
return wsr.redirect_auto()
Expand Down

0 comments on commit 7b5e85f

Please sign in to comment.