Check required data before printing examination-compensation form
This commit is contained in:
parent
ebe02ec6a6
commit
cc036bc1e2
2 changed files with 10 additions and 1 deletions
|
|
@ -933,6 +933,9 @@ def print_examination_compensation_form(request, pk):
|
|||
travail de diplôme
|
||||
"""
|
||||
student = Student.objects.get(pk=pk)
|
||||
if not student.is_examination_valid:
|
||||
messages.error(request, "Toutes les informations ne sont pas disponibles pour la lettre à l’expert!")
|
||||
return redirect(reverse("admin:stages_student_change", args=(student.pk,)))
|
||||
pdf = ExaminationCompensationPdfForm(student)
|
||||
pdf.produce()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue