From 6542999c541b9baa6b2a1baf3a8d4940f2a6f832 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Tue, 15 Aug 2017 18:44:27 +0500 Subject: [PATCH] Removed redundant condition in QuerySet.resolve_expression(). --- django/db/models/query.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/db/models/query.py b/django/db/models/query.py index 4e6e65b0f8..f6fe830ace 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -1136,8 +1136,7 @@ class QuerySet: if self._fields and len(self._fields) > 1: # values() queryset can only be used as nested queries # if they are set up to select only a single field. - if len(self._fields) > 1: - raise TypeError('Cannot use multi-field values as a filter value.') + raise TypeError('Cannot use multi-field values as a filter value.') query = self.query.resolve_expression(*args, **kwargs) query._db = self._db return query