From a076b806e7f3c4abf296e6da8f728341f7e2a28f Mon Sep 17 00:00:00 2001 From: "Jonathan S. Katz" Date: Thu, 30 Sep 2021 08:45:02 -0400 Subject: [PATCH] Fix bug for release notes version display On new major release, we were including the "-0" for the link to the release notes. This should not be included. This likely affected all new major releases, but went unnoticed for some time. --- pgweb/core/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgweb/core/models.py b/pgweb/core/models.py index 47e412e2..df29ed37 100644 --- a/pgweb/core/models.py +++ b/pgweb/core/models.py @@ -47,6 +47,8 @@ class Version(models.Model): @property def relnotes(self): if self.tree >= Decimal('8.2'): + if self.latestminor == 0: + return 'release-{}.html'.format(str(self.numtree).replace('.', '-')) return 'release-{}-{}.html'.format(str(self.numtree).replace('.', '-'), self.latestminor) elif self.tree >= Decimal('7.1'): return 'release.html' -- 2.39.5