  
          names = set(self.model._meta.get_all_field_names())
          for aggregate in kwargs:
              if aggregate in names:
                  raise ValueError("The %s annotation conflicts with a field on "
                      "the model." % aggregate)
  
  
          obj = self._clone()
  
 
</s> remove                 raise ValueError("The %s named annotation conflicts with the "
 </s> add                 raise ValueError("The named annotation '%s' conflicts with the " </s> remove         names = set(self.model._meta.get_all_field_names())
 </s> add         names = getattr(self, '_fields', None)
        if names is None:
            names = set(self.model._meta.get_all_field_names())
                raise ValueError("The annotation '%s' conflicts with a field on "
  
          names = set(self.model._meta.get_all_field_names())
          for aggregate in kwargs:
              if aggregate in names:
                raise ValueError("The annotation '%s' conflicts with a field on "
                      "the model." % aggregate)
  
  
          obj = self._clone()
  
keep keep keep keep replace keep keep keep keep keep
 Fixed #14707 -- Relax the protections on aggregate naming collisions when a ValuesQuerySet removes the colliding name. Thanks to Andy McKay for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15223 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/models/query.py