mirror of
https://github.com/django/django.git
synced 2025-07-07 11:19: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:
parent
ea52757c10
commit
855423542c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user