diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 1484d9dca9..96ecdbc1f4 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -376,7 +376,7 @@ class QuerySet(object): keyword arguments. """ clone = self.filter(*args, **kwargs) - if self.query.can_filter(): + if self.query.can_filter() and not self.query.distinct_fields: clone = clone.order_by() num = len(clone) if num == 1: |
