diff --git a/sessao/views.py b/sessao/views.py index 025f3687f..9e11e17aa 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -231,14 +231,12 @@ class OradorExpedienteDelete(FormMixin, sessao_crud.CrudDetailView): def post(self, request, *args, **kwargs): self.object = self.get_object() - current_url = request.get_full_path() - words = current_url.split('/') form = OradorDeleteForm(request.POST) if form.is_valid(): orador = OradorExpediente.objects.get( sessao_plenaria_id=self.object.id, - parlamentar_id=words[-1]) + parlamentar_id=kwargs['oid']) orador.delete() return self.form_valid(form) else: