Browse Source

Arruma bug ao salvar matéria anexada sem preencher nada

pull/244/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
eac474b7a0
  1. 6
      materia/views.py

6
materia/views.py

@ -146,7 +146,7 @@ class MateriaAnexadaView(FormMixin, GenericView):
messages.add_message(request, messages.INFO, msg) messages.add_message(request, messages.INFO, msg)
return self.render_to_response( return self.render_to_response(
{'form': form, {'form': form,
'materialegislativa': mat_principal, 'object': mat_principal,
'anexadas': anexadas}) 'anexadas': anexadas})
anexada = Anexada() anexada = Anexada()
@ -165,14 +165,14 @@ class MateriaAnexadaView(FormMixin, GenericView):
messages.add_message(request, messages.INFO, msg) messages.add_message(request, messages.INFO, msg)
return self.render_to_response( return self.render_to_response(
{'form': form, {'form': form,
'materialegislativa': mat_principal, 'object': mat_principal,
'anexadas': anexadas}) 'anexadas': anexadas})
return self.form_valid(form) return self.form_valid(form)
else: else:
return self.render_to_response( return self.render_to_response(
{'form': form, {'form': form,
'materialegislativa': mat_principal, 'object': mat_principal,
'anexadas': anexadas}) 'anexadas': anexadas})
def get_success_url(self): def get_success_url(self):

Loading…
Cancel
Save