From: Guillaume Pellerin Date: Mon, 18 May 2026 07:57:10 +0000 (+0200) Subject: no payments for profs X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=60e3a5eb82a2a2442961b0c19bf41f75092a25a3;p=teleforma.git no payments for profs --- diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index 02a3ecdc..0bb287db 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -1200,10 +1200,11 @@ class CRFPAProfileView(ProfileView): profile = user.get_profile() except: profile = None - student = user.student.get() - payment = student.payments.order_by('-id').all() - if payment: - payment = payment[0] + if not request.user.professor.all(): + student = user.student.get() + payment = student.payments.order_by('-id').all() + if payment: + payment = payment[0] else: raise Http404("No access")