From a23b22f8d5e6e5661063b7c4e1c27ab1567be01e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 31 Mar 2019 14:24:52 +0200 Subject: [PATCH] Only get the current version for docs pages if we need it --- pgweb/docs/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pgweb/docs/views.py b/pgweb/docs/views.py index 59eeaf7d..928c1ca8 100644 --- a/pgweb/docs/views.py +++ b/pgweb/docs/views.py @@ -24,11 +24,8 @@ from .forms import DocCommentForm @content_sources('style', "'unsafe-inline'") def docpage(request, version, filename): loaddate = None - # Get the current version both to map the /current/ url, and to later - # determine if we allow comments on this page. - currver = Version.objects.filter(current=True)[0].tree if version == 'current': - ver = currver + ver = Version.objects.filter(current=True)[0].tree elif version == 'devel': ver = Decimal(0) loaddate = Version.objects.get(tree=Decimal(0)).docsloaded -- 2.39.5