id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 13383 Querysets should only allow the correct model types to be filtered against Chris Beaven "Here's a simple example of what is allowed at the moment. It seems that this should throw an exception for the last line: {{{ In [1]: from django.contrib.auth.models import * In [3]: u = User.objects.all()[0] In [5]: m = Message.objects.create(user=u, message='test') In [6]: m.pk, u.pk Out[6]: (1, 1) In [10]: User.objects.filter(message=m) Out[10]: [] In [11]: User.objects.filter(message=u) Out[11]: [] }}}" Bug closed Database layer (models, ORM) dev Normal duplicate Accepted 0 0 0 0 0 0