1
0
mirror of https://github.com/django/django.git synced 2025-07-07 19:29:12 +00:00

[soc2009/model-validation] remove validate_unique from ModelForm

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@10884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Honza Král 2009-06-02 00:37:38 +00:00
parent ea52757c10
commit 855423542c

View File

@ -241,7 +241,6 @@ class BaseModelForm(BaseForm):
def clean(self):
opts = self._meta
self.instance = make_instance(self, self.instance, opts.fields, opts.exclude)
self.validate_unique()
try:
self.instance.clean(exclude=self._errors.keys())
except ValidationError, e:
@ -387,7 +386,7 @@ class BaseModelFormSet(BaseFormSet):
break
else:
return
unique_checks, date_checks = form._get_unique_checks()
unique_checks, date_checks = form.instance._get_unique_checks()
errors = []
# Do each of the unique checks (unique and unique_together)
for unique_check in unique_checks: