From: Radek Czajka Date: Thu, 20 Jun 2013 12:42:24 +0000 (+0200) Subject: fix for non-sectioned lessons nav X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/5d8a65f12464816813e1b03837d65af1580c6fe5?ds=inline;hp=4a5465903e5c24822b1d9f68c69f71b5daf4bc45 fix for non-sectioned lessons nav --- 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