From 321b8f338ff6e008c2af4a8c2b45e7b9b38c7759 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 4 Feb 2016 12:19:37 +0100 Subject: [PATCH] fix null options --- teleforma/views/crfpa.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index 458121ce..eb69e8ee 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -450,10 +450,10 @@ class RegistrationPDFView(PDFTemplateResponseMixin, TemplateView): student.trainings.add(student.training) if not student.training and student.trainings.all(): student.training = student.trainings.all()[0] - # if not student.oral_1: - # student.oral_1 = Course.object.get(code='X') - # if not student.oral_2: - # student.oral_2 = Course.object.get(code='X') + if not student.oral_1: + student.oral_1 = Course.objects.get(code='X') + if not student.oral_2: + student.oral_2 = Course.objects.get(code='X') student.save() profile = user.profile.all()[0] if profile.city: -- 2.39.5