Skip to content

Commit ac02518

Browse files
committed
fix cancel type error in single action()
1 parent 386ab1c commit ac02518

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pywebio/io_ctrl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ def single_input(item_spec, valid_func, preprocess_func, onchange_func):
261261
preprocess_funcs={name: preprocess_func},
262262
item_valid_funcs={name: valid_func},
263263
onchange_funcs={name: onchange_func})
264+
265+
if not data: # form cancel
266+
return None
264267
return data[name]
265268

266269

0 commit comments

Comments
 (0)