Skip to content
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

SDK: fix string field serialization for multipart/form-data requests #5479

Merged
merged 4 commits into from
Jan 10, 2023

Commits on Dec 16, 2022

  1. SDK: fix field serialization for multipart/form-data requests

    Django REST Framework ignores the Content-Type on request body parts, so
    it doesn't know that they are JSON-encoded. Instead, it just tries to decode
    each part as if it was an `str()`-encoded value.
    
    Change the encoding to match the decoding. The only type this matters for
    is `str`, because `json.dumps` and `str` produce different encodings for
    `str` values.
    
    Remove `none_type` from the list of encodable types since, to my knowledge,
    there's no way to encode a `None` value as a `multipart/form-data` part in
    a way that DRF will understand.
    SpecLad committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    deb2c54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    079b277 View commit details
    Browse the repository at this point in the history
  3. Update changelog

    SpecLad committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    185ae38 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2023

  1. Configuration menu
    Copy the full SHA
    10ae205 View commit details
    Browse the repository at this point in the history