Sort WorkflowAction classes from the get_all() method.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-25 04:14:19 -04:00
parent a11b0eb39a
commit 60d157717f
2 changed files with 7 additions and 3 deletions

View File

@@ -50,7 +50,11 @@ class WorkflowAction(six.with_metaclass(WorkflowActionMetaclass, WorkflowActionB
@classmethod
def get_all(cls):
return cls._registry
return sorted(cls._registry.values(), key=lambda x: x.label)
@classmethod
def id(cls):
return '{}.{}'.format(cls.__module__, cls.__name__)
@staticmethod
def initialize():