From cf107cc9550d51586e7baeea55a148a57ef370e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 9 Jun 2022 21:09:35 -0300 Subject: [PATCH] =?UTF-8?q?Excluir=20eventos=20sem=20data=20in=C3=ADcio=20?= =?UTF-8?q?do=20calend=C3=A1rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/eventos/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sigi/apps/eventos/views.py b/sigi/apps/eventos/views.py index 75b860b..6233526 100644 --- a/sigi/apps/eventos/views.py +++ b/sigi/apps/eventos/views.py @@ -40,7 +40,8 @@ def calendario(request): locale.setlocale(locale.LC_ALL, lang) for ano, mes in ( - Evento.objects.values_list("data_inicio__year", "data_inicio__month") + Evento.objects.exclude(data_inicio=None) + .values_list("data_inicio__year", "data_inicio__month") .order_by("data_inicio__year", "data_inicio__month") .distinct("data_inicio__year", "data_inicio__month") ):