From 743c44eb90d5b88575be64a7c25671d443f6d825 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 26 Jul 2017 13:54:32 -0300 Subject: [PATCH] =?UTF-8?q?Ajusta=20preenchimento=20de=20campos=20de=20pro?= =?UTF-8?q?tocolo=20mat=C3=A9ria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/protocoloadm/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index c478b6f62..e11def026 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -419,12 +419,10 @@ class ProtocoloMateriaView(PermissionRequiredMixin, CreateView): protocolo.numero = ( numero['numero__max'] + 1) if numero['numero__max'] else 1 protocolo.ano = datetime.now().year - protocolo.data = datetime.strptime(datetime.now().strftime("%Y-%m-%d"), - '%Y-%m-%d') - protocolo.hora = datetime.strptime(datetime.now().strftime("%H:%M"), - '%H:%M') - protocolo.timestamp = datetime.strptime( - datetime.now().strftime("%Y-%m-%d %H:%M"), "%Y-%m-%d %H:%M") + protocolo.data = datetime.now().date() + protocolo.hora = datetime.now().time() + protocolo.timestamp = datetime.now() + protocolo.tipo_protocolo = 0 protocolo.tipo_processo = '1' # TODO validar o significado protocolo.anulado = False