Implement a .clean method for the WorkflowAction class.

Pass the view request to the form so that it can be passed to the
WorkflowAction clean method.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-26 02:55:36 -04:00
parent 4dcaa5f883
commit b63723feaf
3 changed files with 21 additions and 1 deletions

View File

@@ -44,6 +44,10 @@ class WorkflowActionBase(object):
class WorkflowAction(six.with_metaclass(WorkflowActionMetaclass, WorkflowActionBase)):
@classmethod
def clean(cls, request, form_data=None):
return form_data
@classmethod
def get(cls, name):
return cls._registry[name]