mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 01:26:54 +00:00
Pending teams can change their composition
This commit is contained in:
parent
7628387158
commit
8f86ea15c8
@ -341,7 +341,7 @@ class TeamLeaveView(LoginRequiredMixin, TemplateView):
|
|||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
if not request.user.registration.participates or not request.user.registration.team:
|
if not request.user.registration.participates or not request.user.registration.team:
|
||||||
raise PermissionDenied(_("You are not in a team."))
|
raise PermissionDenied(_("You are not in a team."))
|
||||||
if request.user.registration.team.participation.valid is not None:
|
if request.user.registration.team.participation.valid:
|
||||||
raise PermissionDenied(_("The team is already validated or the validation is pending."))
|
raise PermissionDenied(_("The team is already validated or the validation is pending."))
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user