This is best demonstrated by an example. Suppose you have the following models:
b = models.ForeignKey(B)
Then suppose you did this:
a = models.A.objects.create()
b = models.B.objects.create()
# This works, because the following assertion is True
c = models.C.objects.create(b=b)
# Let's try to query for a c where b==b. Works as expected
# Uh oh, why can I query for b=a? This first one shouldn't pass
# This one should fail, but it should fail at the .get() by
# raising an exception, I think
My proposal is that Django should complain when I pass in an instance of A for comparison with an FK to B, since a isn't the same as b. The query seems to just compare their primary keys, and not also ensure that the types are what is expected.
I've created a small django project that demonstrates this problem.