On Wed, Apr 10, 2013 at 2:26 PM, bradley griffiths
<[email protected]> wrote:
> Cross posted from: stack overflow.
>
> When using the 'in' operator on two querysets, the first time the call is
> made it fails.
>
> …
>
> print category_list # [<Category: Film>, <Category: Commercial>]
> print other_cats # [<Category: Film>]
> print category_list[0] in other_cats # False
> print category_list[0] in other_cats # True
>
>
> If I remove 'prefetch_related' and use 'all' instead then the problem is
> gone, however this uses many more DB calls.
>
> How can I get the correct result first time using prefetch_related?

I doubt this behaviour is expected, raise a ticket with full details.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to