From: Guillaume Pellerin Date: Fri, 10 Dec 2021 16:07:43 +0000 (+0100) Subject: fix student export X-Git-Tag: 2.5.1~20^2^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=efba2f8db9137fcab8814555d655b58e0258eca4;p=teleforma.git fix student export --- diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index e258cd1d..1722581c 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -270,9 +270,7 @@ class UserXLSBook(object): # if counter >= 419: # import pdb;pdb.set_trace() user = student.user - if student.training: - training = student.training - elif student.trainings.all(): + if student.trainings.all(): training = student.trainings.all()[0] else: training = None