Skip to content

[OC-3036] Fixed double quotes issue in OCIM's JSON fields

Michael Cornwell requested to merge macornwell/ocim-json-quotes into master

This pull request fixes a double quotes json bug that occurs when adding a new application instance on OCIM. This fixes an issue with deserializing the django_extensions library's JSONField where invalid json would be created.

JIRA tickets: OC-3036

Dependencies: None

Sandbox URL: TBD - sandbox is being provisioned.

Merge deadline: "None"

Testing instructions:

  1. Open up a running version of OCIM with this pull request.
  2. Go to the django admin.
  3. Attempt to add a new "Open edX Instances"
  4. Scrolling down "Openstack server flavor" and "Openstack server base image" contain valid json where all string values are encased in double quotes rather than single quotes.
  5. Put in valid values for all required fields.
  6. Save. There should be no exceptions that occur.

Author notes and concerns:

  1. In the long run it is probably better to use Django's own JSONField, but that requires upgrading postgresql's version. For now this works.

Reviewers

  • mtyaka

Merge request reports