Browse Source

Switch to use kwargs

pull/7/head
Edward Ribeiro 10 years ago
parent
commit
fa0d527709
  1. 4
      sessao/views.py

4
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:

Loading…
Cancel
Save