Commit eb9870f270d9cc31003305560cb7a692210a7471

Authored by Gustavo
1 parent a7a4307f

Ordering students by ID

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
bulletin/views.py
... ... @@ -306,7 +306,7 @@ class CreateView(LoginRequiredMixin, LogMixin, generic.edit.CreateView):
306 306 meta_geral = Goals.objects.get(topic=topic)
307 307 metas = GoalItem.objects.filter(goal = meta_geral)
308 308 itens_da_meta = sorted(list(metas), key = lambda met: met.id)
309   - alunos = meta_geral.topic.subject.students.all()
  309 + alunos = sorted(list(meta_geral.topic.subject.students.all()), key = lambda e: e.id)
310 310 create_excel_file(alunos, itens_da_meta,meta_geral)
311 311 context['goal_file'] = str(meta_geral.slug)+".xls"
312 312  
... ...