mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Invent the concept of a "numtree" for versions
This property returns a single digit numbers for versions 10 and up (10, 11 etc), and keeps the two digit number for earlier (9.0, 9.1 etc).
This commit is contained in:
@ -102,7 +102,7 @@ class _VersionPdfWrapper(Version):
|
||||
return getattr(self.__version, name)
|
||||
def _find_pdf(self, pagetype):
|
||||
try:
|
||||
return os.stat('%s/documentation/pdf/%s/postgresql-%s-%s.pdf' % (settings.STATIC_CHECKOUT, self.__version.tree, self.__version.tree, pagetype)).st_size
|
||||
return os.stat('%s/documentation/pdf/%s/postgresql-%s-%s.pdf' % (settings.STATIC_CHECKOUT, self.__version.numtree, self.__version.numtree, pagetype)).st_size
|
||||
except:
|
||||
return 0
|
||||
|
||||
|
Reference in New Issue
Block a user