From 5529bcc061ce83b3b696d15c816faa1044a8818d Mon Sep 17 00:00:00 2001 From: Cesar Augusto de Carvalho Date: Wed, 26 Jun 2019 13:46:37 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20#2850=20-=20Ordena=C3=A7=C3=A3o=20de=20co?= =?UTF-8?q?ntent=20type=20(#2852)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index 8955ebc31..ca4dc8c67 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -1456,7 +1456,8 @@ class TipoProposicaoForm(ModelForm): self.fields['content_type'].choices = [ (ct.pk, ct) for k, ct in content_types.items()] - self.fields['content_type'].choices.sort(key=lambda x: str(x[1])) + # Ordena por id + self.fields['content_type'].choices.sort(key=lambda x: x[0]) if self.instance.pk: self.fields[