Fix form error access for django 1.6
In Django 1.6, the _get_errors() method is not available in django 1.6, while errors is a property on forms that is available. Partially-implements: blueprint django-1point6 Change-Id: I959fbb50fc33b927251d00ebd70592bb90b92cff
This commit is contained in:
@@ -166,7 +166,7 @@ class Action(forms.Form):
|
|||||||
|
|
||||||
def add_error(self, message):
|
def add_error(self, message):
|
||||||
"""Adds an error to the Action's Step based on API issues."""
|
"""Adds an error to the Action's Step based on API issues."""
|
||||||
self._get_errors()[NON_FIELD_ERRORS] = self.error_class([message])
|
self.errors[NON_FIELD_ERRORS] = self.error_class([message])
|
||||||
|
|
||||||
def handle(self, request, context):
|
def handle(self, request, context):
|
||||||
"""Handles any requisite processing for this action. The method should
|
"""Handles any requisite processing for this action. The method should
|
||||||
|
|||||||
Reference in New Issue
Block a user