Ticket #1021: scm-4828-unique-together-might-be-null.diff
File scm-4828-unique-together-might-be-null.diff, 761 bytes (added by , 18 years ago) |
---|
-
home/ddanier/django-unique-together/django/db/models/manipulators.py
294 294 # doesn't have blank=True. 295 295 return 296 296 if isinstance(f.rel, ManyToOneRel): 297 kwargs['%s__pk' % f.name] = field_val 297 if field_val in ('', None) and f.null: 298 kwargs['%s__isnull' % f.name] = True 299 else: 300 kwargs['%s__pk' % f.name] = field_val 298 301 else: 299 302 kwargs['%s__iexact' % f.name] = field_val 300 303 try: