#13383: Querysets should only allow the correct model types to be filtered 
against
---------------------------------------------------+------------------------
          Reporter:  SmileyChris                   |         Owner:  anonymous
            Status:  assigned                      |     Milestone:  1.3      
         Component:  Database layer (models, ORM)  |       Version:  SVN      
        Resolution:                                |      Keywords:           
             Stage:  Accepted                      |     Has_patch:  0        
        Needs_docs:  0                             |   Needs_tests:  0        
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by anonymous):

  * owner:  nobody => anonymous
  * status:  new => assigned

Comment:

 It seems last line wil not throw an exception but returns empty list
 >>> u = User.objects.all()[0]
 >>> m = Message.objects.create(user=u, message='test')
 >>> m
 <Message: test>
 >>> u
 <User: admin>

 >>> User.objects.filter(message=m)
 [<User: admin>]
 >>> User.objects.filter(message=u)
 []
 >>>

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13383#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en.

Reply via email to