Browse Source

Fixes #1300 (#1310)

pull/1314/head
Edward 8 years ago
committed by GitHub
parent
commit
750748afce
  1. 12
      sapl/materia/views.py

12
sapl/materia/views.py

@ -958,6 +958,12 @@ class TramitacaoCrud(MasterDetailCrud):
def form_valid(self, form): def form_valid(self, form):
self.object = form.save() self.object = form.save()
if form.instance.status.indicador == 'F':
form.instance.materia.em_tramitacao = False
else:
form.instance.materia.em_tramitacao = True
form.instance.materia.save()
try: try:
tramitacao_signal.send(sender=Tramitacao, tramitacao_signal.send(sender=Tramitacao,
post=self.object, post=self.object,
@ -981,6 +987,12 @@ class TramitacaoCrud(MasterDetailCrud):
def form_valid(self, form): def form_valid(self, form):
self.object = form.save() self.object = form.save()
if form.instance.status.indicador == 'F':
form.instance.materia.em_tramitacao = False
else:
form.instance.materia.em_tramitacao = True
form.instance.materia.save()
try: try:
tramitacao_signal.send(sender=Tramitacao, tramitacao_signal.send(sender=Tramitacao,
post=self.object, post=self.object,

Loading…
Cancel
Save