From efba2f8db9137fcab8814555d655b58e0258eca4 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 10 Dec 2021 17:07:43 +0100 Subject: [PATCH] fix student export --- teleforma/views/crfpa.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 2.39.5