Ticket #5970: django_admin_search_bug.patch
File django_admin_search_bug.patch, 770 bytes (added by , 17 years ago) |
---|
-
django/contrib/admin/views/main.py
753 753 if self.lookup_opts.admin.search_fields and self.query: 754 754 for bit in self.query.split(): 755 755 or_queries = [models.Q(**{construct_search(field_name): bit}) for field_name in self.lookup_opts.admin.search_fields] 756 other_qs = QuerySet(self.model)756 other_qs = self.manager.get_query_set() 757 757 if qs._select_related: 758 758 other_qs = other_qs.select_related() 759 759 other_qs = other_qs.filter(reduce(operator.or_, or_queries))