Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit a77b642

Browse files
committed
Update swf.models.decision: use underscore_to_camel to translate action
1 parent 185b3f2 commit a77b642

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

swf/models/decision/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from functools import wraps
99

10-
from swf.utils import decapitalize
10+
from swf.utils import decapitalize, underscore_to_camel
1111

1212

1313
def decision_action(fn):
@@ -46,8 +46,9 @@ def __init__(self, action=None, *args, **kwargs):
4646
action_method(*args, **kwargs)
4747

4848
def _fill_from_action(self, action):
49-
self.type = action.capitalize() + self._base_type
50-
self.attributes_key = decapitalize(self.type + self._attributes_key_suffix)
49+
self.type = underscore_to_camel(action) + self._base_type
50+
self.attributes_key = decapitalize(self.type +
51+
self._attributes_key_suffix)
5152

5253
self['decisionType'] = self.type
5354
self[self.attributes_key] = {}

0 commit comments

Comments
 (0)