python3: reduce needs proper six import (#32449)
This commit is contained in:
parent
ac65fa8c4f
commit
f63bd36159
|
@ -15,6 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.db import models
|
||||
from django.utils import six
|
||||
from django.utils import timezone
|
||||
from django.contrib.auth.models import BaseUserManager
|
||||
|
||||
|
@ -44,7 +45,7 @@ class UserQuerySet(models.QuerySet):
|
|||
q = q | models.query.Q(
|
||||
attribute_values__content__icontains=term, attribute_values__attribute=a)
|
||||
queries.append(q)
|
||||
self = self.filter(reduce(models.query.Q.__and__, queries))
|
||||
self = self.filter(six.moves.reduce(models.query.Q.__and__, queries))
|
||||
# search by attributes can match multiple times
|
||||
if searchable_attributes:
|
||||
self = self.distinct()
|
||||
|
|
Loading…
Reference in New Issue