Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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/
4 django/core/
@@ -123,6 +123,10 @@ def __init__(self, message, code=None, params=None):
def message_dict(self):
+ # Trigger an AttributeError if this ValidationError
+ # doesn't have an error_dict.
+ getattr(self, 'error_dict')
return dict(self)
Please sign in to comment.
Something went wrong with that request. Please try again.