]> git.parisson.com Git - teleforma.git/commitdiff
fix ae student
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 22 Aug 2013 14:23:44 +0000 (16:23 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 22 Aug 2013 14:23:44 +0000 (16:23 +0200)
teleforma/views/core.py

index 73357e03fe9cec0cb3c351a168282ca9d19540f2..1bf845667213a05bfe442165a4a77c489cf6f4ce 100644 (file)
@@ -153,10 +153,10 @@ def get_host(request):
     return host
 
 def get_periods(user):
-    student = user.student.all()
+    student = user.ae_student.all()
     if student:
-        student = user.student.get()
-        periods = [training.period for training in student.trainings.all()]
+        student = user.ae_student.get()
+        periods = student.period.all()
 
     if user.is_superuser or user.is_staff:
         periods = Period.objects.all()