Commit ebe5ad2a authored by Jorrit Schaap's avatar Jorrit Schaap

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

parent 0d1a3b60
......@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
import json
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):
'''
......@@ -40,7 +40,7 @@ def _populate_correlator_schema():
"name": "correlator schema",
"description": 'first attempt at correlator schema',
"version": '0.1',
"schema": json.dumps(json.loads('''
"schema": json.loads('''
{
"$id": "http://example.com/example.json",
"type": "object",
......@@ -150,7 +150,7 @@ def _populate_correlator_schema():
]
}
}
}''')),
}'''),
"realtime": True,
"queue": False,
"tags": []}
......@@ -163,7 +163,7 @@ def _populate_obscontrol_schema():
"name": "obscontrol schema",
"description": 'first attempt at obscontrol schema',
"version": '0.1',
"schema": json.dumps(json.loads('''
"schema": json.loads('''
{
"$id": "http://example.com/example.json",
"type": "object",
......@@ -461,7 +461,7 @@ def _populate_obscontrol_schema():
}
}
}
}''')),
}'''),
"realtime": True,
"queue": False,
"tags": []}
......@@ -475,7 +475,7 @@ def _populate_stations_schema():
"name": "stations schema",
"description": 'first attempt at stations schema',
"version": '0.1',
"schema": json.dumps(json.loads('''
"schema": json.loads('''
{
"$id": "http://example.com/example.json",
"type": "object",
......@@ -704,7 +704,7 @@ def _populate_stations_schema():
}
}
}
}''')),
}'''),
"realtime": True,
"queue": False,
"tags": []}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment