Ticket #7197: ticket_7197.2.patch

File ticket_7197.2.patch, 687 bytes (added by anonymous, 16 years ago)
  • django/db/models/manipulators.py

     
    282282    from django.utils.text import get_text_list
    283283    field_list = [opts.get_field(field_name) for field_name in field_name_list]
    284284    if isinstance(field_list[0].rel, ManyToOneRel):
    285         kwargs = {'%s__%s__iexact' % (field_name_list[0], field_list[0].rel.field_name): field_data}
     285        kwargs = {'%s__pk' % field_name_list[0]: field_data}
    286286    else:
    287287        kwargs = {'%s__iexact' % field_name_list[0]: field_data}
    288288    for f in field_list[1:]:
Back to Top