Re: [Django] #12687: Using exclude on a queryset with an annotate field give attribute error.

2010-10-26 Thread Django
#12687: Using exclude on a queryset with an annotate field give attribute error.
--+-
  Reporter:  AsgeirM  | Owner:  
   
Status:  new  | Milestone:  1.3 
   
 Component:  ORM aggregation  |   Version:  1.2 
   
Resolution:   |  Keywords:  annotate exclude 
AttributeError
 Stage:  Accepted | Has_patch:  0   
   
Needs_docs:  0|   Needs_tests:  0   
   
Needs_better_patch:  0|  
--+-
Comment (by Petr Marhoun ):

 Ticket #13356 was closed as duplicate of this patch - It is true that is
 seems to be quite similar and there is more information here. But I think
 that it has more simple example of the problem and it could be also here.

 Following code works :

 {{{
 #!python
 from django.contrib.auth.models import User
 from django.db.models import Count
 User.objects.filter(id__in=[]).annotate(Count('groups'))
 []
 User.objects.filter(id__in=[]).count()
 0
 }}}

 But following code raise !EmptyResultSet:

 {{{
 #!python
 User.objects.filter(id__in=[]).annotate(Count('groups')).count()
 }}}

-- 
Ticket URL: 
Django 
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.



Re: [Django] #12687: Using exclude on a queryset with an annotate field give attribute error.

2010-06-07 Thread Django
#12687: Using exclude on a queryset with an annotate field give attribute error.
--+-
  Reporter:  AsgeirM  | Owner:  
   
Status:  new  | Milestone:  1.3 
   
 Component:  ORM aggregation  |   Version:  1.2 
   
Resolution:   |  Keywords:  annotate exclude 
AttributeError
 Stage:  Accepted | Has_patch:  0   
   
Needs_docs:  0|   Needs_tests:  0   
   
Needs_better_patch:  0|  
--+-
Changes (by anonymous):

  * version:  1.1 => 1.2

Comment:

 Also attribute error in Django 1.2:
 {{{
 print q_set.filter(~Q(parent__somefield=1)).query
 }}}

-- 
Ticket URL: 
Django 
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.



Re: [Django] #12687: Using exclude on a queryset with an annotate field give attribute error.

2010-03-10 Thread Django
#12687: Using exclude on a queryset with an annotate field give attribute error.
--+-
  Reporter:  AsgeirM  | Owner:  
   
Status:  new  | Milestone:  1.3 
   
 Component:  ORM aggregation  |   Version:  1.1 
   
Resolution:   |  Keywords:  annotate exclude 
AttributeError
 Stage:  Accepted | Has_patch:  0   
   
Needs_docs:  0|   Needs_tests:  0   
   
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * milestone:  1.2 => 1.3

Comment:

 Not critical for 1.2.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #12687: Using exclude on a queryset with an annotate field give attribute error.

2010-02-10 Thread Django
#12687: Using exclude on a queryset with an annotate field give attribute error.
--+-
  Reporter:  AsgeirM  | Owner:  
   
Status:  new  | Milestone:  1.2 
   
 Component:  ORM aggregation  |   Version:  1.1 
   
Resolution:   |  Keywords:  annotate exclude 
AttributeError
 Stage:  Accepted | Has_patch:  0   
   
Needs_docs:  0|   Needs_tests:  0   
   
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.2

-- 
Ticket URL: 
Django 
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.