diff --git a/apps/participation/views.py b/apps/participation/views.py index 378d36e..622b8f5 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -305,12 +305,16 @@ class TeamUpdateView(LoginRequiredMixin, UpdateView): context = super().get_context_data(**kwargs) context["participation_form"] = ParticipationForm(data=self.request.POST or None, instance=self.object.participation) + if not self.request.user.registration.is_volunteer: + del context["participation_form"].fields['final'] context["title"] = _("Update team {trigram}").format(trigram=self.object.trigram) return context @transaction.atomic def form_valid(self, form): participation_form = ParticipationForm(data=self.request.POST or None, instance=self.object.participation) + if not self.request.user.registration.is_volunteer: + del participation_form.fields['final'] if not participation_form.is_valid(): return self.form_invalid(form)