sort list of users by username in helpdesk/tickets/X/cc/add/

This commit is contained in:
Andreas Kotowicz 2011-02-06 18:49:07 +01:00
parent 8ed7debbdf
commit 2d302ceba6

View File

@ -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',)