From 5d8a65f12464816813e1b03837d65af1580c6fe5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 20 Jun 2013 14:42:24 +0200 Subject: [PATCH] fix for non-sectioned lessons nav --- catalogue/templatetags/catalogue_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index abaa524..32a5a0b 100755 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -38,7 +38,7 @@ def section_box(section): def lesson_nav(lesson): if lesson.type == 'course': root = lesson.section - siblings = root.lesson_set.filter(type='course', level=lesson.level) + siblings = Lesson.objects.filter(type='course', level=lesson.level, section=root) mark_level = False else: root = None -- 2.20.1