Browse Source

Fix #2850 - Ordenação de content type (#2852)

pull/2761/head
Cesar Augusto de Carvalho 6 years ago
committed by Cesar Carvalho
parent
commit
5529bcc061
  1. 3
      sapl/materia/forms.py

3
sapl/materia/forms.py

@ -1456,7 +1456,8 @@ class TipoProposicaoForm(ModelForm):
self.fields['content_type'].choices = [ self.fields['content_type'].choices = [
(ct.pk, ct) for k, ct in content_types.items()] (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: if self.instance.pk:
self.fields[ self.fields[

Loading…
Cancel
Save