Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.6.x] Fixed backport error in previous commit; refs #15961

  • Loading branch information...
commit 90bdb42702327a4ef74e74d2e123da0731a90c4c 1 parent 9053c6d
Tim Graham timgraham authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/contrib/admin/options.py
5 django/contrib/admin/options.py
View
@@ -756,10 +756,9 @@ def construct_search(field_name):
return "%s__icontains" % field_name
use_distinct = False
- search_fields = self.get_search_fields(request)
- if search_fields and search_term:
+ if self.search_fields and search_term:
orm_lookups = [construct_search(str(search_field))
- for search_field in search_fields]
+ for search_field in self.search_fields]
for bit in search_term.split():
or_queries = [models.Q(**{orm_lookup: bit})
for orm_lookup in orm_lookups]
Please sign in to comment.
Something went wrong with that request. Please try again.