Project

General

Profile

« Previous | Next » 

Revision 3db8d984

Added by Jérôme Schneider over 11 years ago

agenda: order participants by last_name (fix #2376)

View differences:

calebasse/ressources/lookups.py
33 33
        if service:
34 34
            kwargs = { "%s__icontains" % self.search_field : q }
35 35
            group = FakeGroup('group:%s' % service.id, service.name)
36
            return itertools.chain([group], self.model.objects.for_service(service.id).order_by(self.search_field))
36
            return itertools.chain([group], self.model.objects.for_service(service.id).order_by('last_name'))
37 37

  
38 38
        kwargs = { "%s__icontains" % self.search_field : q }
39
        return self.model.objects.filter(enabled=True).filter(**kwargs).order_by(self.search_field)
39
        return self.model.objects.filter(enabled=True).filter(**kwargs).order_by('last_name')
40 40

  
41 41
    def get_result(self, obj):
42 42
        return self.format_item_display(obj)

Also available in: Unified diff