Commit 90aa8e7f authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

quick fix if for migration if main model is null.

parent 4e97e7bb
Pipeline #265269 failed with stages
in 2 minutes and 48 seconds
......@@ -53,7 +53,8 @@ public class JsonConverter {
AttributesSimulation attributesSimulation = StateJsonConverter.deserializeAttributesSimulationFromNode(scenarioNode.get(AttributesSimulation.JSON_KEY));
AttributesPsychology attributesPsychology = StateJsonConverter.deserializeAttributesPsychologyFromNode(scenarioNode.get(AttributesPsychology.JSON_KEY));
JsonNode attributesModelNode = scenarioNode.get("attributesModel");
String mainModel = scenarioNode.get(StateJsonConverter.MAIN_MODEL_KEY).isNull() ? null : scenarioNode.get(StateJsonConverter.MAIN_MODEL_KEY).asText();
String mainModel = (!scenarioNode.has(StateJsonConverter.MAIN_MODEL_KEY) ||
scenarioNode.get(StateJsonConverter.MAIN_MODEL_KEY).isNull()) ? null : scenarioNode.get(StateJsonConverter.MAIN_MODEL_KEY).asText();
List<Attributes> attributesModel = StateJsonConverter.deserializeAttributesListFromNode(attributesModelNode);
Topography topography = StateJsonConverter.deserializeTopographyFromNode(scenarioNode.get("topography"));
StimulusInfoStore stimulusInfoStore = StateJsonConverter.deserializeStimuliFromArrayNode(scenarioNode.get("stimulusInfos"));
......
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