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.
This commit is contained in:
Raul Gallegos
2021-03-23 10:49:33 -05:00
committed by GitHub
parent 23443c4376
commit 130b9f7bb3

View File

@@ -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