From f8be7fb90ffc3c9f58418c21a40bc725ff12be0a Mon Sep 17 00:00:00 2001 From: Ulysses Lara Date: Thu, 9 Jul 2020 10:36:46 -0300 Subject: [PATCH] =?UTF-8?q?Filtrando=20proposi=C3=A7=C3=A3o=20por=20data?= =?UTF-8?q?=20de=20recebimento=20(#3219)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/views.py | 2 +- scripts/gerar_hash_proposicoes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index 960e7827c..67222cd6c 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -2065,7 +2065,7 @@ class AppConfigCrud(CrudAux): recibo_prop_atual = AppConfig.objects.last().receber_recibo_proposicao recibo_prop_novo = self.request.POST['receber_recibo_proposicao'] if recibo_prop_novo == 'False' and recibo_prop_atual: - props = Proposicao.objects.filter(hash_code='').exclude(data_envio__isnull=True) + props = Proposicao.objects.filter(hash_code='', data_recebimento__isnull=True).exclude(data_envio__isnull=True) for prop in props: try: self.gerar_hash(prop) diff --git a/scripts/gerar_hash_proposicoes.py b/scripts/gerar_hash_proposicoes.py index 0591ec60f..f7a3af3a6 100644 --- a/scripts/gerar_hash_proposicoes.py +++ b/scripts/gerar_hash_proposicoes.py @@ -20,7 +20,7 @@ def gerar_hash(proposicao): def gerar_hash_proposicoes(): di = datetime.now() print(di) - props = Proposicao.objects.filter(hash_code='').exclude(data_envio__isnull=True) + props = Proposicao.objects.filter(hash_code='', data_recebimento__isnull=True).exclude(data_envio__isnull=True) print("Total de proposicoes: %s" % props.count()) for prop in props: try: