I am using a recent svn checkout. I opened a ticket for the issue: http://code.djangoproject.com/ticket/10181
Best. On Feb 3, 5:03 am, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Mon, 2009-02-02 at 03:23 -0800,omatwrote: > > Hi, > > > I am receiving an EmptyResultSet exception in 'in' lookups, if the > > lookup is against an empty ValuesListQuerySet. > > > Here is the case: > > > >>> ids = Tag.objects.filter(id__in=[]).values_list(id, flat=True) > > > Now the ids is an empty ValuesListQuerySet as expected. If I use it in > > an 'in' lookup: > > > >>> Tag.objects.filter(id__in=ids) > > > This results in an EmptyResultSet exception, where I would expect an > > empty QuerySet instead. > > > Am I missing something here? > > Probably a bug. Please open a ticket with a short description of the > problem. Nested queryset handling is fairly new, so there are some edge > cases that might not work yet. > > I'm assuming here that you're using a recent subversion trunk checkout, > by the way. If you're using Django 1.0.x, that's a different story, > since nested querysets aren't supported there. > > Regards, > Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---