mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	magic-removal: Fixed #1249 -- Fixed bug in manipulator_validator_unique
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -32,7 +32,7 @@ def manipulator_validator_unique(f, opts, self, field_data, all_data): | ||||
|         old_obj = self.manager.get_object(**{lookup_type: field_data}) | ||||
|     except ObjectDoesNotExist: | ||||
|         return | ||||
|     if hasattr(self, 'original_object') and self.original_object._get_pk_val() == old_obj._get_pk_val(): | ||||
|     if getattr(self, 'original_object', None) and self.original_object._get_pk_val() == old_obj._get_pk_val(): | ||||
|         return | ||||
|     raise validators.ValidationError, _("%(optname)s with this %(fieldname)s already exists.") % {'optname': capfirst(opts.verbose_name), 'fieldname': f.verbose_name} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user