Skip to content

Commit d5665e5

Browse files
committed
Merge branch 'master' into fix-search-sphinx-2.1
2 parents e23183a + 8f9cb19 commit d5665e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

readthedocs/proxito/views/serve.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,11 @@ def get(self, request, proxito_path, template_name='404.html'):
261261
# If that doesn't work, attempt to serve the 404 of the current version (version_slug)
262262
# Secondly, try to serve the 404 page for the default version
263263
# (project.get_default_version())
264-
for version_slug_404 in set([version_slug, final_project.get_default_version()]):
264+
versions = [version_slug]
265+
default_version_slug = final_project.get_default_version()
266+
if default_version_slug != version_slug:
267+
versions.append(default_version_slug)
268+
for version_slug_404 in versions:
265269
for tryfile in ('404.html', '404/index.html'):
266270
storage_root_path = final_project.get_storage_path(
267271
type_='html',

0 commit comments

Comments
 (0)