diff --git a/apps/registration/views.py b/apps/registration/views.py index 00a3616..6997c93 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -242,7 +242,7 @@ class UserDetailView(LoginRequiredMixin, DetailView): user = self.get_object() if user == me or me.registration.is_admin or me.registration.is_volunteer \ and user.registration.participates and user.registration.team \ - and user.registration.team.participation.tournament in user.registration.organized_tournaments.all() \ + and user.registration.team.participation.tournament in me.registration.organized_tournaments.all() \ or user.registration.is_volunteer and me.registration.is_volunteer \ and me.registration.interesting_tournaments.intersection(user.registration.intersting_tournaments): return super().dispatch(request, *args, **kwargs)