Ticket #3851: ticket3851.diff
File ticket3851.diff, 630 bytes (added by , 17 years ago) |
---|
-
django/db/models/manipulators.py
295 295 # doesn't have blank=True. 296 296 return 297 297 if isinstance(f.rel, ManyToOneRel): 298 kwargs['%s__pk' % f.name] = field_val 298 if field_val == '': 299 kwargs['%s__isnull' % f.name] = True 300 else: 301 kwargs['%s__pk' % f.name] = field_val 299 302 else: 300 303 kwargs['%s__iexact' % f.name] = field_val 301 304 try: