Skip to content

Commit 7ac456f

Browse files
committed
Fix missing step arg in save listeners
1 parent 50e99d3 commit 7ac456f

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

slack_bolt/util/payload_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ def to_step(body: Dict[str, Any]) -> Optional[Dict[str, Any]]:
222222
# edit
223223
if is_workflow_step_edit(body):
224224
return body["workflow_step"]
225+
# save
226+
if is_workflow_step_save(body):
227+
return body["workflow_step"]
225228
# execute
226229
if is_workflow_step_execute(body):
227230
return body["event"]["workflow_step"]

tests/scenario_tests/test_workflow_steps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ def edit(ack: Ack, step, configure: Configure):
325325
)
326326

327327

328-
def save(ack: Ack, view: dict, update: Update):
328+
def save(ack: Ack, step: dict, view: dict, update: Update):
329+
assert step is not None
330+
assert view is not None
329331
state_values = view["state"]["values"]
330332
update(
331333
inputs={

tests/scenario_tests_async/test_workflow_steps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ async def edit(ack: AsyncAck, step, configure: AsyncConfigure):
344344
)
345345

346346

347-
async def save(ack: AsyncAck, view: dict, update: AsyncUpdate):
347+
async def save(ack: AsyncAck, step: dict, view: dict, update: AsyncUpdate):
348+
assert step is not None
349+
assert view is not None
348350
state_values = view["state"]["values"]
349351
await update(
350352
inputs={

0 commit comments

Comments
 (0)