Ticket #2818: search_distinct.2.diff
File search_distinct.2.diff, 728 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/views/main.py
731 731 other_qs = other_qs.select_related() 732 732 other_qs = other_qs.filter(reduce(operator.or_, or_queries)) 733 733 qs = qs & other_qs 734 for field_name in self.lookup_opts.admin.search_fields: 735 if len(field_name.split("__")) > 1: 736 qs = qs.distinct() 737 break 734 738 735 739 if self.opts.one_to_one_field: 736 740 qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to)