Skip to content

Commit

Permalink
personal: Sort groups by name in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Sep 16, 2020
1 parent 8a8c293 commit 2c67501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpicms/personal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_queryset(self):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['groups'] = Group.objects.all()
context['groups'] = Group.objects.all().order_by("name")
group_pk = self.request.GET.get('group')
context['selected_group_pk'] = group_pk
context['selected_group'] = get_object_or_404(Group, pk=group_pk) if group_pk else ""
Expand Down

0 comments on commit 2c67501

Please sign in to comment.