0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

Update Redirect.link to avoid double-slashes in the return value

This commit is contained in:
Andy Babic 2022-01-10 23:34:31 +00:00 committed by Matt Westcott
parent e69bccf273
commit 5a28898c70

View File

@ -62,7 +62,7 @@ class Redirect(models.Model):
page.resolve_subpage(self.redirect_page_route_path)
except Resolver404:
return base_url
return base_url + self.redirect_page_route_path
return base_url.rstrip("/") + self.redirect_page_route_path
elif self.redirect_link:
return self.redirect_link
return None