From a44439671e0869f1b05ea96d31f05b27bd904b91 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 29 Mar 2024 17:44:38 +0100 Subject: [PATCH] Organizers can edit payments Signed-off-by: Emmy D'Anello --- registration/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registration/views.py b/registration/views.py index 19fce8d..e5e41ba 100644 --- a/registration/views.py +++ b/registration/views.py @@ -453,7 +453,7 @@ class PaymentUpdateView(LoginRequiredMixin, UpdateView): object = self.get_object() if not user.is_authenticated or \ not user.registration.is_admin \ - and (user.registration.is_volunteer and user.registration in object.tournament.organizers.all() + and (user.registration.is_volunteer and user.registration not in object.tournament.organizers.all() or user.registration.is_student and user.registration not in object.registrations.all() or user.registration.is_coach and user.registration.team != object.team): return self.handle_no_permission()