Commit 541871fe by Tom Christie

Merge pull request #1216 from linovia/master

Fixed a regression with ValidationError under Django 1.6
parents 97430c0d d4a50429
......@@ -42,6 +42,7 @@ def pretty_name(name):
class RelationsList(list):
_deleted = []
class NestedValidationError(ValidationError):
"""
The default ValidationError behavior is to stringify each item in the list
......@@ -56,9 +57,13 @@ class NestedValidationError(ValidationError):
def __init__(self, message):
if isinstance(message, dict):
self.messages = [message]
self._messages = [message]
else:
self.messages = message
self._messages = message
@property
def messages(self):
return self._messages
class DictWithMetadata(dict):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment