This could cause a crash when the devel version of the docs had a
placeholder entry for a major version that had not yet been released.
# If we have an exact match for our major version, get that one. If not, get the release
# notes from the highest available version.
- release_notes = exec_to_dict("SELECT content FROM docs WHERE file=%(filename)s ORDER BY version=%(major_version)s DESC, version DESC LIMIT 1", {
+ release_notes = exec_to_dict("SELECT content FROM docs WHERE file=%(filename)s AND version > 0 ORDER BY version=%(major_version)s DESC, version DESC LIMIT 1", {
'filename': version_file,
'major_version': major_version,
})