From 7ae483659cebb4034bfcdadaaf790a2328844b3a Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Tue, 2 Feb 2016 11:52:42 -0200 Subject: [PATCH] Fix protocolar documento --- protocoloadm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocoloadm/views.py b/protocoloadm/views.py index 75638c7de..b0c69bb1f 100644 --- a/protocoloadm/views.py +++ b/protocoloadm/views.py @@ -487,7 +487,7 @@ class ProtocoloDocumentoView(FormMixin, GenericView): else: numeracao = Protocolo.objects.all().aggregate(Max('numero')) - if numeracao is None: + if numeracao['numero__max'] is None: numeracao['numero__max'] = 0 protocolo = Protocolo()