Fix a wrong return type from Base64Field.value_to_string().

Review Request #12538 — Created Aug. 15, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

Base64Field.value_to_string() has been returning a byte string, but
this isn't actually compliant with what Django expects. This must return
a Unicode string. It's used for the serialization process, which doesn't
work with bytes on Python 3.

This switches the return type to use the correct string type.

Unit tests pass in Djblets and Review Board.

Succesfully serialized a database to JSON.

Summary ID
Fix a wrong return type from Base64Field.value_to_string().
`Base64Field.value_to_string()` has been returning a byte string, but this isn't actually compliant with what Django expects. This must return a Unicode string. It's used for the serialization process, which doesn't work with `bytes` on Python 3. This switches the return type to use the correct string type.
0b7465522acb6191e1ad776f1889dfea19fd92a2
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (bb8ad5d)
Loading...