Skip to content

Commit 5825564

Browse files
Fix parameter handling for decentralized event handlers
Co-Authored-By: khaleel@reflex.dev <khaleel.aladhami@gmail.com>
1 parent e1d07b4 commit 5825564

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

reflex/event.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,8 +1673,11 @@ def call_event_fn(
16731673
# Check if this is a decentralized event handler
16741674
if is_decentralized_event_handler(fn):
16751675
wrapped_fn = wrap_decentralized_handler(fn)
1676-
# Call the wrapped function directly without passing arg_spec
1677-
return [wrapped_fn()]
1676+
1677+
parsed_args = parse_args_spec(arg_spec)
1678+
1679+
# Call the wrapped function with the parsed arguments
1680+
return [wrapped_fn(*parsed_args)]
16781681

16791682
# Check that fn signature matches arg_spec
16801683
check_fn_match_arg_spec(fn, arg_spec, key=key)

0 commit comments

Comments
 (0)