Retain documentation version when navigating paginated links.
authorJonathan S. Katz <jonathan.katz@excoventures.com>
Sun, 6 Jan 2019 21:32:02 +0000 (16:32 -0500)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Sun, 6 Jan 2019 21:32:02 +0000 (16:32 -0500)
The old code always raised an exception as the variable being checked
was not defined at that point. Now, it checks the variable that one
expects to be set.

pgweb/search/views.py

index a89d7cd501f7c466ac0d9527566ca116d8479e5a..c6061a78af85c6c5a7bccaca7199ae0348702d5f 100644 (file)
@@ -290,7 +290,7 @@ def search(request):
                conn.close()
                totalhits = int(hits[-1][5])
                try:
-                       if quoted_suburl:
+                       if suburl:
                                quoted_suburl = urllib.quote_plus(suburl)
                        else:
                                quoted_suburl = ''