Browse Source

HOT-FIX: corrige teste de classes em post_delete

pull/2946/merge
Leandro Roberto 5 years ago
parent
commit
9f29a46df4
  1. 4
      sapl/base/receivers.py

4
sapl/base/receivers.py

@ -29,12 +29,12 @@ def handle_tramitacao_signal(sender, **kwargs):
@receiver(post_delete) @receiver(post_delete)
def status_tramitacao_materia(sender, instance, **kwargs): def status_tramitacao_materia(sender, instance, **kwargs):
if isinstance(sender, Tramitacao): if sender == Tramitacao:
if instance.status.indicador == 'F': if instance.status.indicador == 'F':
materia = instance.materia materia = instance.materia
materia.em_tramitacao = True materia.em_tramitacao = True
materia.save() materia.save()
elif isinstance(sender, TramitacaoAdministrativo): elif sender == TramitacaoAdministrativo:
if instance.status.indicador == 'F': if instance.status.indicador == 'F':
documento = instance.documento documento = instance.documento
documento.tramitacao = True documento.tramitacao = True

Loading…
Cancel
Save