On Mon, Dec 10, 2012 at 8:58 PM, Skylar Saveland <skylar.savel...@gmail.com>wrote:
> > I posted this in the django-users group but I think it may merit posting > here, as well. I have a test case which I think should pass. > > > https://github.com/skyl/django/commit/556df1c46146c2fc9c4022d838fa23f652f0ea8d > > Is this a bug? If so, is it a bug that is not in the tracker? > > I'd say it's a bug. I can't find an exact match in trac but I'd guess the root cause is similar to what's underlying: https://code.djangoproject.com/ticket/11387 The SQL for the query in your test case that attempts to fetch the Animal object tags using values_list is: SELECT "generic_relations_taggeditem"."id" FROM "generic_relations_animal" LEFT OUTER JOIN "generic_relations_taggeditem" ON ("generic_relations_animal"."id" = "generic_relations_taggeditem"."object_id") This suffers from the same problem as the sql in #11387: it's not including any restriction on content type in the query, thus you can get tags that are pointing to non-Animals. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.