Skip to content

Commit 78fdbed

Browse files
committed
simplify convert_multiple_choice_fields
1 parent a54f035 commit 78fdbed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reactpy_django/forms/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def convert_multiple_choice_fields(data: dict[str, Any], initialized_form: Form
1414

1515
# Convert multiple choice field text into a list of values
1616
for choice_field_name in multi_choice_fields:
17-
if choice_field_name in data and not isinstance(data[choice_field_name], list):
17+
if not isinstance(data.get(choice_field_name), list):
1818
data[choice_field_name] = [data[choice_field_name]]
1919

2020

0 commit comments

Comments
 (0)