Ensure the new "release-prior" page can be accessed.

This fixes a bug where the "release-prior" page was being evaluated as
a legacy release notes page in the supported docs.
This commit is contained in:
Jonathan S. Katz
2019-03-09 22:52:27 -08:00
parent ba529fe1de
commit 70fd8913ac

View File

@ -61,7 +61,7 @@ def docpage(request, version, filename):
# only available for the current version (e.g. 11 only has 11.0, 11.1, 11.2)
# This checks to see if there is a mismatch (e.g. ver = 9.4, fullname = release-9-3-2.html)
# and perform a redirect to the older version
if fullname.startswith('release-') and ver >= Decimal("9.4"):
if fullname.startswith('release-') and ver >= Decimal("9.4") and not fullname.startswith('release-prior'):
# figure out which version to redirect to. Note that the oldest version
# of the docs loaded is 7.2
release_version = re.sub(r'release-((\d+)(-\d+)?)(-\d+)?.html',