diff --git a/django/db/models/base.py b/django/db/models/base.py index af06ee1c12..06db7cc4e6 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -745,9 +745,7 @@ class Model(object): if not getattr(self, '_adding', False) and self.pk is not None: qs = qs.exclude(pk=self.pk) - # This cute trick with extra/values is the most efficient way to - # tell if a particular query returns any results. - if qs.extra(select={'a': 1}).values('a').order_by(): + if qs.exists(): errors.setdefault(field, []).append( self.date_error_message(lookup_type, field, unique_for) )