Skip to content
Snippets Groups Projects
Commit d844aa7e authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-190: fix for jsoneditor and meta schemas

parent 1880fcb6
No related branches found
No related tags found
1 merge request!252Resolve TMSS-190
......@@ -58,6 +58,12 @@ class JSONEditorField(serializers.JSONField):
# so, let's do the resolving here and feed the resolved schema to the josdejong_jsoneditor_widget
schema = json_utils.resolved_refs(schema)
# the editor already fetched and cached common meta schema's from json-schema.org
# and raises an error if we supply it as well
# so, set schema to None for those
if 'json-schema.org' in value.get('$schema'):
schema = None
self.style = {'template': 'josdejong_jsoneditor_widget.html',
'schema': json.dumps(schema)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment