1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-11-01 06:24:32 +01:00

Prevent some errors

This commit is contained in:
Emmy D'Anello
2025-04-23 21:02:49 +02:00
parent 032b67ac51
commit 626433c464
3 changed files with 6 additions and 5 deletions

View File

@@ -557,7 +557,7 @@ class ParticipationDetailView(LoginRequiredMixin, DetailView):
if not self.get_object().valid:
raise PermissionDenied(_("The team is not validated yet."))
if user.registration.is_admin or user.registration.participates \
and user.registration.team.participation \
and user.registration.team \
and user.registration.team.participation.pk == kwargs["pk"] \
or user.registration.is_volunteer \
and (self.get_object().tournament in user.registration.interesting_tournaments