Skip to content

Commit afafca1

Browse files
committed
Solve on the same issue
1 parent 195bd20 commit afafca1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

jsweb/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ def __call__(self, **kwargs):
196196
if checked:
197197
radio_attrs['checked'] = 'checked'
198198

199+
radio_attrs_str = " ".join(f'{k}="{v}"' for k, v in radio_attrs.items())
199200
html.append('<li>')
200-
html.append(f'<input {" ".join(f"{k}=\"{v}\"" for k, v in radio_attrs.items())}>')
201+
html.append(f'<input {radio_attrs_str}>')
201202
html.append(f'<label for="{option_id}">{label}</label>')
202203
html.append('</li>')
203204
html.append('</ul>')

0 commit comments

Comments
 (0)