Skip to content

Commit 09262a1

Browse files
authored
Redirect /libs/{library} to latest docs version (#1977) (#1981)
1 parent e0ceb5a commit 09262a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ def dispatch(self, request, *args, **kwargs):
339339
version_slug=get_prioritized_version(request),
340340
)
341341
return redirect(
342-
get_documentation_url_redirect(library_version, latest=False)
342+
get_documentation_url_redirect(
343+
library_version,
344+
latest=self.get_version() == Version.objects.most_recent(),
345+
)
343346
)
344347
response = super().dispatch(request, *args, **kwargs)
345348
set_selected_boost_version(

0 commit comments

Comments
 (0)