#14366: Model.objects.none().values(...).anything() is broken
------------------------------------------+---------------------------------
 Reporter:  carljm                        |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 There's a bug in the interaction of EmptyQuerySet and ValuesQuerySet;
 chaining .none() with .values() and then following that with any QuerySet
 method that causes a clone results in "AttributeError: 'ValuesQuerySet'
 object has no attribute 'field_names'".

 (Obviously this chain is useless in the simple case, but the utility of
 .none() is for methods that need to return a QuerySet but in some cases
 should return one with no results; this can easily break in such cases if
 the caller of that method does further processing the returned queryset
 that includes .values()).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14366>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
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.

Reply via email to