Fix importing of floating point values in extra_data as string.

Review Request #8250 — Created June 18, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
8d61b39...

Reviewers

import_extra_data() has special handling for converting string representations
of Boolean and integer values in extra_data to their respective data types,
but lacks handling for floating point values. This trickles up so that JSON
responses to API queries show floating point values as strings rather than
numeric values. This issue is fixed by adding special handling for floating
point data types.

JSON snippets of a response to a review request draft update are attached to
illustrate the before and after behavior. Notice the floating point fields
are quoted (e.g. represented as strings) in the before case.

  • Added a new unit test which failed prior to this fix.
  • Ran unit tests.

    Loading...