-
-
Notifications
You must be signed in to change notification settings - Fork 262
Fix optional bodies #1357
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 optional bodies #1357
Conversation
| _json: dict[str, Any] | Unset = UNSET | ||
| if not isinstance(body, Unset): | ||
| _json = body.to_dict() | ||
| _kwargs["json"] = _json |
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.
Gotta move this under the if check
c39737d to
0b1c3c2
Compare
| | Unset | ||
| | PostBodiesMultipleDataBody | ||
| | Unset | ||
| | PostBodiesMultipleFilesBody | ||
| | Unset = UNSET, |
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.
Unions still aren't quite right. This shouldn't list Unset twice and in a different, local union test it was trying to call .to_dict() on an Unset
0b1c3c2 to
d538096
Compare
Reopening #1357 Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
Fixes #1354