diff --git a/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py b/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py index f19ee6f1913f297bed9f97fcfc920ebb150954b7..cf663040c0585f4d8cd1a8be595ab151a9215c2d 100644 --- a/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py +++ b/SAS/TMSS/src/tmss/tmssapp/serializers/widgets.py @@ -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)}