From: Guillaume Pellerin Date: Thu, 4 Feb 2016 11:19:37 +0000 (+0100) Subject: fix null options X-Git-Tag: 1.1~81 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=321b8f338ff6e008c2af4a8c2b45e7b9b38c7759;p=teleforma.git fix null options --- 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: