From 1e9c75b98778d87e5343e258a31201e9e4ebb61c Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Mon, 28 Mar 2016 14:25:09 -0700 Subject: [PATCH] Sort users_to_notify Sorting "Users to notify" on the service/instance forms is very useful to me... I think everyone will find it easier on the eyes. --- cabot/cabotapp/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabot/cabotapp/views.py b/cabot/cabotapp/views.py index 798a7b4..fde9745 100644 --- a/cabot/cabotapp/views.py +++ b/cabot/cabotapp/views.py @@ -293,7 +293,7 @@ class InstanceForm(SymmetricalForm): def __init__(self, *args, **kwargs): ret = super(InstanceForm, self).__init__(*args, **kwargs) self.fields['users_to_notify'].queryset = User.objects.filter( - is_active=True) + is_active=True).order_by('first_name', 'last_name') return ret @@ -334,7 +334,7 @@ class ServiceForm(forms.ModelForm): def __init__(self, *args, **kwargs): ret = super(ServiceForm, self).__init__(*args, **kwargs) self.fields['users_to_notify'].queryset = User.objects.filter( - is_active=True) + is_active=True).order_by('first_name', 'last_name') return ret def clean_hackpad_id(self):