From 2d302ceba65921e8c20fa8f24f70f9cd0bb811ec Mon Sep 17 00:00:00 2001 From: Andreas Kotowicz Date: Sun, 6 Feb 2011 18:49:07 +0100 Subject: [PATCH] sort list of users by username in helpdesk/tickets/X/cc/add/ --- helpdesk/forms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpdesk/forms.py b/helpdesk/forms.py index 3b55a62f..cc455002 100644 --- a/helpdesk/forms.py +++ b/helpdesk/forms.py @@ -499,6 +499,10 @@ class EmailIgnoreForm(forms.ModelForm): model = IgnoreEmail class TicketCCForm(forms.ModelForm): + def __init__(self, *args, **kwargs): + super(TicketCCForm, self).__init__(*args, **kwargs) + self.fields['user'].queryset = User.objects.filter(is_active=True).order_by('username') class Meta: model = TicketCC exclude = ('ticket',) +