fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for non-sectioned lessons nav
[edumed.git]
/
catalogue
/
models.py
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
e20d58c
..
652f972
100644
(file)
--- a/
catalogue/models.py
+++ b/
catalogue/models.py
@@
-202,8
+202,15
@@
class Lesson(models.Model):
ContentFile(buff.getvalue()))
def get_syntetic(self):
ContentFile(buff.getvalue()))
def get_syntetic(self):
+ if self.section is None: return None
return self.section.syntetic_lesson(self.level)
return self.section.syntetic_lesson(self.level)
+ def get_other_level(self):
+ if self.section is None: return None
+ other_levels = self.section.lesson_set.exclude(level=self.level)
+ if other_levels.exists():
+ return other_levels[0].level
+
def get_previous(self):
if self.section is None: return None
try:
def get_previous(self):
if self.section is None: return None
try: