Fix deserializing data from a JSONFormField.

Review Request #9270 — Created Oct. 15, 2017 and submitted

Information

Djblets
release-0.10.x
dab43d6...

Reviewers

JSONFormField, used by JSONField, knew how to take JSON data and
serialize it for use in the field, but it didn't then deserialize that
data back after cleaning the field. This didn't always matter in all
cases, but depending on how the form was constructed and validated, it
could result in validation errors or incorrect data being made available
to callers.

This change implements the to_python method, which handles the
deserialization side. This should ensure that the resulting object is
always going to be valid JSON data (or will result in a
ValidationError).

Unit tests pass, including new ones in Review Board that broke prior to
this fix.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.10.x (741b77c)