Corr. fiche indemnité superviseur
This commit is contained in:
parent
da46061a5a
commit
0135cc43c7
1 changed files with 5 additions and 2 deletions
|
|
@ -560,8 +560,11 @@ class PrintCompensationForm(PDFBaseView):
|
|||
self.typ = self.kwargs['typ']
|
||||
if self.typ in ('mentor', 'supervisor'):
|
||||
student = self.get_object()
|
||||
if not student.mentor:
|
||||
messages.error(request, "Aucun mentor/superviseur n’est attribué à cet étudiant")
|
||||
if self.typ == 'mentor' and not student.mentor:
|
||||
messages.error(request, "Aucun mentor n’est attribué à cet étudiant")
|
||||
return redirect(reverse("admin:stages_student_change", args=(student.pk,)))
|
||||
elif self.typ == 'supervisor' and not student.supervisor:
|
||||
messages.error(request, "Aucun superviseur n’est attribué à cet étudiant")
|
||||
return redirect(reverse("admin:stages_student_change", args=(student.pk,)))
|
||||
else:
|
||||
exam = self.get_object()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue