-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue where empty WebUI property is not parsed correctly #3012
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,9 +285,9 @@ def swarm() -> Response: | |
if isinstance(parsed_options_value, bool): | ||
parsed_options_dict[key] = value == "true" | ||
elif parsed_options_value is None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can do:
This way we still get the type casting from the else statement There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type checking indeed doesn't make sense if the
Here the That's why I suggested |
||
parsed_options_dict[key] = parsed_options_value | ||
parsed_options_dict[key] = value | ||
else: | ||
parsed_options_dict[key] = type(parsed_options_dict[key])(value) | ||
parsed_options_dict[key] = type(parsed_options_value)(value) | ||
|
||
if environment.shape_class and environment.runner is not None: | ||
environment.runner.start_shape() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks for adding tests!