From fa0d527709a6eb5f00dc1cd8bed2ab5b7c3a6f61 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 11 Sep 2015 19:15:43 -0300 Subject: [PATCH] Switch to use kwargs --- sessao/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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: