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

TMSS-379: do not set common meta schema from json-schema.org

parent d2c065d3
No related branches found
No related tags found
2 merge requests!260syncing cob-master with master again,!247Resolve TMSS-379 "Input"
......@@ -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