Browse Source

HOT-FIX: corrige signal de ajuste de indicador de tramitação

pull/2946/merge
Leandro Roberto 5 years ago
parent
commit
c08e0a69d3
  1. 3
      sapl/base/receivers.py

3
sapl/base/receivers.py

@ -1,6 +1,5 @@
from django.db.models.signals import post_delete, post_save from django.db.models.signals import post_delete, post_save
from django.dispatch import receiver from django.dispatch import receiver
from sapl.materia.models import Tramitacao from sapl.materia.models import Tramitacao
from sapl.protocoloadm.models import TramitacaoAdministrativo from sapl.protocoloadm.models import TramitacaoAdministrativo
from sapl.base.signals import tramitacao_signal from sapl.base.signals import tramitacao_signal
@ -30,7 +29,7 @@ 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, TramitacaoAdministrativo): if isinstance(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

Loading…
Cancel
Save