Hello all,
I'm seeing the following behaviour:
In [2]: Project.objects.all()
Out[2]: [<Project: Debian (Distributions)>, <Project: Test (Space Test)>,
<Project: Test2 (Groupware)>, <Project: aBC (Distributions)>,
<Project: asdun (Groupware)>, <Project: eR (Distributions)>]
In [3]: Project.objects.filter(trainingprogramme__isnull=False)
Out[3]: [<Project: Debian (Distributions)>, <Project: Debian (Distributions)>]
In [18]: [p for p in Project.objects.all() if
list(p.trainingprogramme_set.all()) != []]
Out[18]: [<Project: Debian (Distributions)>]
The middle of those 3 should only return [<Project: Debian
(Distributions)>]. Anyone know what's going on here?
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---