summaryrefslogtreecommitdiff
path: root/django/core/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/exceptions.py')
-rw-r--r--django/core/exceptions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/exceptions.py b/django/core/exceptions.py
index 28e712e0a5..0e333d06e5 100644
--- a/django/core/exceptions.py
+++ b/django/core/exceptions.py
@@ -118,7 +118,10 @@ class ValidationError(Exception):
# Normalize plain strings to instances of ValidationError.
if not isinstance(message, ValidationError):
message = ValidationError(message)
- self.error_list.extend(message.error_list)
+ if hasattr(message, 'error_dict'):
+ self.error_list.extend(sum(message.error_dict.values(), []))
+ else:
+ self.error_list.extend(message.error_list)
else:
self.message = message