diff --git a/instruments/views.py b/instruments/views.py index f69d920..4c503f7 100644 --- a/instruments/views.py +++ b/instruments/views.py @@ -105,11 +105,12 @@ class FicheInstru(LoginRequiredMixin, TemplateView): def post(self, request, *args, **kwargs): instru = get_object_or_404(self.model, id=self.kwargs["pk"]) form = ChefEditInstrumentForm(request.POST, instance=instru) - if request.user.profile.is_chef: + if request.user.profile.is_chef or request.user.profile.is_chef_instru: if form.is_valid(): form.save() context = self.get_context_data() context["form"] = form + print(instru.user) return render(request, self.template_name, context)