#6704: .exclude(foreignkey_field__isnull=True) doesn't quite work on qs-rf
------------------------------+---------------------------------------------
Reporter:  [EMAIL PROTECTED]    |       Owner:  nobody       
  Status:  new                |   Component:  Uncategorized
 Version:  queryset-refactor  |    Keywords:  qs-rf        
   Stage:  Unreviewed         |   Has_patch:  0            
------------------------------+---------------------------------------------
 It gets turned into: (NOT table.foreignkey_field_id IS NULL OR
 table.foreignkey_field_id IS NULL) which of course is always going to be
 true :)

 Haven't got my head around the code yet, but I'm guessing the following
 line is being run in this situation when it shouldn't be (I presume the
 line is intended for when a join is being done to get the required
 attribute on the related object, but for the special case of the id/pk
 field no join is needed and in fact no join was added):
 {{{
 self.where.add([alias, col, field, 'isnull', True], OR)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6704>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to