File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def get_version_compare_data(project, base_version=None):
25
25
:param base_version: We assert whether or not the base_version is also the
26
26
highest version in the resulting "is_highest" value.
27
27
"""
28
- versions_qs = project . versions .public (). filter ( active = True )
28
+ versions_qs = Version . objects .public (project = project )
29
29
30
30
# Take preferences over tags only if the project has at least one tag
31
31
if versions_qs .filter (type = TAG ).exists ():
Original file line number Diff line number Diff line change @@ -202,7 +202,11 @@ def serve_docs(
202
202
if not version_slug :
203
203
version_slug = project .get_default_version ()
204
204
try :
205
- version = project .versions .public (request .user ).get (slug = version_slug )
205
+ version = (
206
+ Version .objects
207
+ .public (user = request .user , project = project )
208
+ .get (slug = version_slug )
209
+ )
206
210
except Version .DoesNotExist :
207
211
# Properly raise a 404 if the version doesn't exist (or is inactive) and
208
212
# a 401 if it does
@@ -409,8 +413,10 @@ def changefreqs_generator():
409
413
410
414
if project .translations .exists ():
411
415
for translation in project .translations .all ():
412
- translation_versions = translation .versions .public (
413
- ).values_list ('slug' , flat = True )
416
+ translation_versions = (
417
+ Version .objects .public (project = translation )
418
+ .values_list ('slug' , flat = True )
419
+ )
414
420
if version .slug in translation_versions :
415
421
href = project .get_docs_url (
416
422
version_slug = version .slug ,
You can’t perform that action at this time.
0 commit comments