From a50d1a1878375f56f537bfc1fef8676b29d90425 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 1 Nov 2016 11:31:07 -0200 Subject: [PATCH] Lista ano em ordem decrescente em pesquisa norma --- sapl/norma/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/norma/forms.py b/sapl/norma/forms.py index a767c37fa..0246ec320 100644 --- a/sapl/norma/forms.py +++ b/sapl/norma/forms.py @@ -84,7 +84,7 @@ class NormaJuridicaPesquisaForm(ModelForm): ano = forms.ModelChoiceField( label='Ano', required=False, - queryset=NormaJuridica.objects.order_by('ano').values_list( + queryset=NormaJuridica.objects.order_by('-ano').values_list( 'ano', flat=True).distinct(), empty_label='Selecione' )