Ticket #7118: manipulator_validator_unique.patch
File manipulator_validator_unique.patch, 773 bytes (added by , 17 years ago) |
---|
-
django/db/models/fields/__init__.py
51 51 return 52 52 if getattr(self, 'original_object', None) and self.original_object._get_pk_val() == old_obj._get_pk_val(): 53 53 return 54 raise validators.ValidationError, _("%(optname)s with this %(fieldname)s already exists.") % {'optname': capfirst(opts.verbose_name), 'fieldname': f.verbose_name}54 raise validators.ValidationError, _("%(optname)s with this %(fieldname)s already exists.")%{'optname':capfirst(opts.verbose_name),'fieldname':f.verbose_name.decode('utf8')} 55 55 56 56 # A guide to Field parameters: 57 57 #