Browse Source

Garantir que as perguntas saiam sempre em ordem de 'title'

stable/1.0
Sesostris Vieira 12 years ago
parent
commit
d6936d4ebf
  1. 1
      sigi/apps/diagnosticos/models.py

1
sigi/apps/diagnosticos/models.py

@ -120,6 +120,7 @@ class Diagnostico(BaseEntity):
schemas = super(Diagnostico,self).get_schemata(*args, **kwargs)
if category:
schemas = [s for s in schemas if s.categoria_id == category]
schemas= sorted(schemas, lambda x,y: cmp(x.title, y.title))
return schemas

Loading…
Cancel
Save