Ensure extra_data is set before modifying it in the API.
Review Request #9907 — Created May 2, 2018 and submitted — Latest diff uploaded
When working with extra_data in the API, we assumed the version on the
object was a valid dictionary. If this was insteadNone
, API requests
would fail. This could happen with very old objects, ones explicitly set
toNone
through a script/terminal, or if something went wrong when
setting up the object.We now check for this and set it to
{}
before operating on it if
necessary.
Unit tests pass.