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

TMSS-145: insert json schema templates as object, not as string

parent 0d1a3b60
No related branches found
No related tags found
1 merge request!100Resolve TMSS-145
...@@ -17,7 +17,7 @@ class Migration(migrations.Migration): ...@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
import json import json
from lofar.sas.tmss.tmss.tmssapp.models.specification import Role, Datatype, Dataformat, CopyReason from lofar.sas.tmss.tmss.tmssapp.models.specification import Role, Datatype, Dataformat, CopyReason
from lofar.sas.tmss.tmss.tmssapp.models.scheduling import SubtaskState, SubtaskType, SubtaskTemplate, StationType, Algorithm, ScheduleMethod from lofar.sas.tmss.tmss.tmssapp.models.scheduling import SubtaskState, SubtaskType, SubtaskTemplate, Subtask, StationType, Algorithm, ScheduleMethod
def populate_choices(apps, schema_editor): def populate_choices(apps, schema_editor):
''' '''
...@@ -40,7 +40,7 @@ def _populate_correlator_schema(): ...@@ -40,7 +40,7 @@ def _populate_correlator_schema():
"name": "correlator schema", "name": "correlator schema",
"description": 'first attempt at correlator schema', "description": 'first attempt at correlator schema',
"version": '0.1', "version": '0.1',
"schema": json.dumps(json.loads(''' "schema": json.loads('''
{ {
"$id": "http://example.com/example.json", "$id": "http://example.com/example.json",
"type": "object", "type": "object",
...@@ -150,7 +150,7 @@ def _populate_correlator_schema(): ...@@ -150,7 +150,7 @@ def _populate_correlator_schema():
] ]
} }
} }
}''')), }'''),
"realtime": True, "realtime": True,
"queue": False, "queue": False,
"tags": []} "tags": []}
...@@ -163,7 +163,7 @@ def _populate_obscontrol_schema(): ...@@ -163,7 +163,7 @@ def _populate_obscontrol_schema():
"name": "obscontrol schema", "name": "obscontrol schema",
"description": 'first attempt at obscontrol schema', "description": 'first attempt at obscontrol schema',
"version": '0.1', "version": '0.1',
"schema": json.dumps(json.loads(''' "schema": json.loads('''
{ {
"$id": "http://example.com/example.json", "$id": "http://example.com/example.json",
"type": "object", "type": "object",
...@@ -461,7 +461,7 @@ def _populate_obscontrol_schema(): ...@@ -461,7 +461,7 @@ def _populate_obscontrol_schema():
} }
} }
} }
}''')), }'''),
"realtime": True, "realtime": True,
"queue": False, "queue": False,
"tags": []} "tags": []}
...@@ -475,7 +475,7 @@ def _populate_stations_schema(): ...@@ -475,7 +475,7 @@ def _populate_stations_schema():
"name": "stations schema", "name": "stations schema",
"description": 'first attempt at stations schema', "description": 'first attempt at stations schema',
"version": '0.1', "version": '0.1',
"schema": json.dumps(json.loads(''' "schema": json.loads('''
{ {
"$id": "http://example.com/example.json", "$id": "http://example.com/example.json",
"type": "object", "type": "object",
...@@ -704,7 +704,7 @@ def _populate_stations_schema(): ...@@ -704,7 +704,7 @@ def _populate_stations_schema():
} }
} }
} }
}''')), }'''),
"realtime": True, "realtime": True,
"queue": False, "queue": False,
"tags": []} "tags": []}
......
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