From 130b9f7bb386a02775e4d5bd67f93095f05c6c6e Mon Sep 17 00:00:00 2001 From: Raul Gallegos Date: Tue, 23 Mar 2021 10:49:33 -0500 Subject: [PATCH] fix: contentstore next section navigation (#27112) Fixes bug introduced by #25965 (commit dd96a2) pointed out in: https://github.com/edx/edx-platform/commit/dd96a2#r48570091 The next button redirect at the top of the sequence in Studio's Unit editing view was not going to the correct location. --- cms/djangoapps/contentstore/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index a12881f844..223db4f027 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -587,7 +587,7 @@ def get_sibling_urls(subsection): )) else: try: - next_section = sections[sections.index(next(s for s in sections if s.location == section.location)) - 1] + next_section = sections[sections.index(next(s for s in sections if s.location == section.location)) + 1] next_loc = next_section.get_children()[0].get_children()[0].location except IndexError: pass