Skip to content

Commit

Permalink
Revert "[FIX] website: redirect only when url_to given"
Browse files Browse the repository at this point in the history
This reverts commit 14a8509.
  • Loading branch information
aharter authored and christophlsa committed Apr 3, 2024
1 parent 79e4ff0 commit fa86404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website/models/website_rewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _onchange_route_id(self):
@api.constrains('url_to', 'url_from', 'redirect_type')
def _check_url_to(self):
for rewrite in self:
if rewrite.redirect_type in ['301', '302', '308']:
if rewrite.redirect_type == '308':
if not rewrite.url_to:
raise ValidationError(_('"URL to" can not be empty.'))
if not rewrite.url_from:
Expand Down

0 comments on commit fa86404

Please sign in to comment.