Skip to content

Commit

Permalink
corrige les liens next/prev entre deux parties
Browse files Browse the repository at this point in the history
  • Loading branch information
dralliw committed Jul 23, 2014
1 parent 98c0f07 commit cc8383b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions zds/tutorial/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,10 +1412,7 @@ def view_chapter(
):
"""View chapter."""

chapter = get_object_or_404(Chapter, pk=chapter_pk,
part__pk=part_pk,
part__tutorial__pk=tutorial_pk)
tutorial = chapter.get_tutorial()
tutorial = get_object_or_404(Tutorial, pk=tutorial_pk)

try:
sha = request.GET["version"]
Expand Down Expand Up @@ -1449,7 +1446,7 @@ def view_chapter(
args=[
tutorial.pk,
tutorial.slug,
part_pk,
part["pk"],
part["slug"]])
part["tutorial"] = tutorial
for chapter in part["chapters"]:
Expand Down Expand Up @@ -1538,7 +1535,7 @@ def view_chapter_online(
args=[
tutorial.pk,
tutorial.slug,
part_pk,
part["pk"],
part["slug"]])
part["tutorial"] = mandata
part["position_in_tutorial"] = cpt_p
Expand Down

0 comments on commit cc8383b

Please sign in to comment.