Ticket #3851: unique_together_patch.diff

File unique_together_patch.diff, 582 bytes (added by rezzrovv <pspierce@…>, 18 years ago)

fix unique_together and blank=True ForiegnKey reference

  • django/db/models/manipulators.py

     
    293293            # This will be caught by another validator, assuming the field
    294294            # doesn't have blank=True.
    295295            return
     296        if field_val is '':
     297            kwargs['%s__isnull' % f.name] = True
     298            continue
    296299        if isinstance(f.rel, ManyToOneRel):
    297300            kwargs['%s__pk' % f.name] = field_val
    298301        else:
Back to Top