Ticket #7197: ticket_7197.patch

File ticket_7197.patch, 790 bytes (added by adamfast@…, 16 years ago)

Created patch from instructions inline in the ticket

  • 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__%s__iexact' % (field_name_list[0], field_list[0].rel.field_name): field_data}
     286        kwargs = {'%s__pk' % field_name_list[0]: field_data}
    286287    else:
    287288        kwargs = {'%s__iexact' % field_name_list[0]: field_data}
    288289    for f in field_list[1:]:
Back to Top