Merge "Rename add_error methods: Django 1.7 conflict"
This commit is contained in:
commit
a282435100
|
@ -162,7 +162,7 @@ class Action(forms.Form):
|
||||||
text += linebreaks(force_unicode(self.help_text))
|
text += linebreaks(force_unicode(self.help_text))
|
||||||
return safe(text)
|
return safe(text)
|
||||||
|
|
||||||
def add_error(self, message):
|
def add_action_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.errors[NON_FIELD_ERRORS] = self.error_class([message])
|
self.errors[NON_FIELD_ERRORS] = self.error_class([message])
|
||||||
|
|
||||||
|
@ -430,9 +430,9 @@ class Step(object):
|
||||||
text += self.action.get_help_text()
|
text += self.action.get_help_text()
|
||||||
return safe(text)
|
return safe(text)
|
||||||
|
|
||||||
def add_error(self, message):
|
def add_step_error(self, message):
|
||||||
"""Adds an error to the Step based on API issues."""
|
"""Adds an error to the Step based on API issues."""
|
||||||
self.action.add_error(message)
|
self.action.add_action_error(message)
|
||||||
|
|
||||||
def has_required_fields(self):
|
def has_required_fields(self):
|
||||||
"""Returns True if action contains any required fields."""
|
"""Returns True if action contains any required fields."""
|
||||||
|
@ -861,4 +861,4 @@ class Workflow(html.HTMLElement):
|
||||||
"""
|
"""
|
||||||
step = self.get_step(slug)
|
step = self.get_step(slug)
|
||||||
if step:
|
if step:
|
||||||
step.add_error(message)
|
step.add_step_error(message)
|
||||||
|
|
Loading…
Reference in New Issue