Ticket #7353: correct-field-lookup.patch
File correct-field-lookup.patch, 686 bytes (added by , 16 years ago) |
---|
-
django/db/models/manipulators.py
282 286 from django.utils.text import get_text_list 283 287 field_list = [opts.get_field(field_name) for field_name in field_name_list] 284 288 if isinstance(field_list[0].rel, ManyToOneRel): 285 kwargs = {'%s__ %s__iexact' % (field_name_list[0], field_list[0].rel.field_name): field_data}289 kwargs = {'%s__pk' % field_name_list[0]: field_data} 286 290 else: 287 291 kwargs = {'%s__iexact' % field_name_list[0]: field_data} 288 292 for f in field_list[1:]: