Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2048 from loic/ValidationError.message_dict

Trigger AttributeError in ValidationError.message_dict when error_dict is missing.
  • Loading branch information...
commit c78bd9eff2f7751c7e40b411221c516859b827da 2 parents d653c0b + 2e3c7d8
@apollo13 apollo13 authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/core/exceptions.py
View
4 django/core/exceptions.py
@@ -123,6 +123,10 @@ def __init__(self, message, code=None, params=None):
@property
def message_dict(self):
+ # Trigger an AttributeError if this ValidationError
+ # doesn't have an error_dict.
+ getattr(self, 'error_dict')
+
return dict(self)
@property

0 comments on commit c78bd9e

Please sign in to comment.
Something went wrong with that request. Please try again.