Add dashboard sort clauses: first name and id

I have seen the dashboard sorting be inconsistent. Last name then
first name then id should produce a consistent and predictable
sort order.
This commit is contained in:
Matt Burke 2019-07-08 00:11:27 -04:00
parent f767c7c6fa
commit a2c13df57f
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class Dashboard(LoginRequiredMixin, TemplateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(Dashboard, self).get_context_data(**kwargs) context = super(Dashboard, self).get_context_data(**kwargs)
context['objects'] = Child.objects.all().order_by('last_name') context['objects'] = Child.objects.all() \
.order_by('last_name', 'first_name', 'id')
return context return context