From d831e4fb180fec7349d665e646e34383990c9c8d Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 19 Mar 2019 14:16:04 -0300 Subject: [PATCH] HOT-FIX: conserta chamada a next --- sapl/base/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index f6b34eb51..755510456 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -1272,14 +1272,14 @@ def get_data_ultima_atualizacao(request): NormaJuridica.objects.all(). order_by('-data_ultima_atualizacao'). values_list('data_ultima_atualizacao', flat=True). - first()] + first()] # Retorna [None, None] se inexistem registros max_data = '' if datas[0] and datas[1]: max_data = max(datas) else: - max_data = next([i for i in datas if i is not None], '') + max_data = next(iter([i for i in datas if i is not None]), '') return JsonResponse({'data_ultima_atualizacao': max_data})