mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #15167 -- Ensure that non-form errors are always part of an ErrorList. Thanks to Harm Geerts for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -511,7 +511,7 @@ class BaseModelFormSet(BaseFormSet):
|
||||
# poke error messages into the right places and mark
|
||||
# the form as invalid
|
||||
errors.append(self.get_unique_error_message(unique_check))
|
||||
form._errors[NON_FIELD_ERRORS] = self.get_form_error()
|
||||
form._errors[NON_FIELD_ERRORS] = self.error_class([self.get_form_error()])
|
||||
del form.cleaned_data
|
||||
break
|
||||
# mark the data as seen
|
||||
@@ -542,7 +542,7 @@ class BaseModelFormSet(BaseFormSet):
|
||||
# poke error messages into the right places and mark
|
||||
# the form as invalid
|
||||
errors.append(self.get_date_error_message(date_check))
|
||||
form._errors[NON_FIELD_ERRORS] = self.get_form_error()
|
||||
form._errors[NON_FIELD_ERRORS] = self.error_class([self.get_form_error()])
|
||||
del form.cleaned_data
|
||||
break
|
||||
seen_data.add(data)
|
||||
|
||||
Reference in New Issue
Block a user