Author: jkocherhans Date: 2010-01-04 22:30:51 -0600 (Mon, 04 Jan 2010) New Revision: 12100
Modified: django/trunk/django/db/models/base.py Log: Fixed another instance like [12099]. Thanks again, Alex Gaynor. Modified: django/trunk/django/db/models/base.py =================================================================== --- django/trunk/django/db/models/base.py 2010-01-05 04:12:09 UTC (rev 12099) +++ django/trunk/django/db/models/base.py 2010-01-05 04:30:51 UTC (rev 12100) @@ -745,9 +745,7 @@ 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) ) -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.