Ticket #7682: 7682.diff
File 7682.diff, 827 bytes (added by , 16 years ago) |
---|
-
django/db/models/fields/__init__.py
326 326 params['validator_list'].append(getattr(manipulator, 'isUnique%sFor%s' % (self.name, self.unique_for_month))) 327 327 if self.unique_for_year: 328 328 params['validator_list'].append(getattr(manipulator, 'isUnique%sFor%s' % (self.name, self.unique_for_year))) 329 if self.unique or (self.primary_key and not rel):329 if not rel and (self.unique or self.primary_key): 330 330 params['validator_list'].append(curry(manipulator_validator_unique, self, opts, manipulator)) 331 331 332 332 # Only add is_required=True if the field cannot be blank. Primary keys