Commit c78bd9ef authored by Florian Apolloner's avatar Florian Apolloner
Browse files

Merge pull request #2048 from loic/ValidationError.message_dict

Trigger AttributeError in ValidationError.message_dict when error_dict is missing.
parents d653c0bd 2e3c7d88
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -123,6 +123,10 @@ class ValidationError(Exception):

    @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