From: Guillaume Pellerin Date: Mon, 24 Apr 2017 12:56:30 +0000 (+0200) Subject: Update periods with children X-Git-Tag: 1.1~24 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=43c7e7c84b2d699f5eb63e0a84f55d779b3d5803;p=teleforma.git Update periods with children --- diff --git a/teleforma/views/core.py b/teleforma/views/core.py index cb18088a..d7475297 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -171,7 +171,10 @@ def get_periods(user): if student: student = user.student.get() periods = [training.period for training in student.trainings.all()] - + for period in periods: + for child in period.children.all(): + periods.append(child) + if user.is_superuser or user.is_staff: periods = Period.objects.all()