summaryrefslogtreecommitdiff
path: root/pgweb/docs/struct.py
diff options
context:
space:
mode:
authorMagnus Hagander2013-08-17 13:35:42 +0000
committerMagnus Hagander2013-08-17 13:37:45 +0000
commit8be717d99d3a2e29ff9fe4801bee5efd633c4600 (patch)
treef4755ed92dfd4df8270b7360278d3ef942d6117f /pgweb/docs/struct.py
parent8fc39d7359c1cb56b5d8422039fb10a61d58deb3 (diff)
Use a proper database field for beta releases
This replaces the previous ugly hack where beta versions had a negative number as latestminor, giving a much cleaner model. Requires SQL: ALTER TABLE core_version ADD COLUMN beta boolean NOT NULL DEFAULT 'f'; ALTER TABLE core_version ALTER COLUMN beta DROP DEFAULT; (Yes, we really need to move to something that can do automatic migrations)
Diffstat (limited to 'pgweb/docs/struct.py')
-rw-r--r--pgweb/docs/struct.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgweb/docs/struct.py b/pgweb/docs/struct.py
index 28271f05..ea64d443 100644
--- a/pgweb/docs/struct.py
+++ b/pgweb/docs/struct.py
@@ -9,7 +9,7 @@ def get_struct():
# Can't use a model here, because we don't (for some reason) have a
# hard link to the versions table here
curs = connection.cursor()
- curs.execute("SELECT d.version, d.file, v.docsloaded FROM docs d INNER JOIN core_version v ON v.tree=d.version WHERE d.version > 0 AND v.latestminor >= 0 ORDER BY d.version DESC")
+ curs.execute("SELECT d.version, d.file, v.docsloaded FROM docs d INNER JOIN core_version v ON v.tree=d.version WHERE d.version > 0 AND NOT beta ORDER BY d.version DESC")
# Start priority is higher than average but lower than what we assign
# to the current version of the docs.