diff --git a/src/services/Challenge/Challenge.js b/src/services/Challenge/Challenge.js index ff45941e2..2420aef5a 100644 --- a/src/services/Challenge/Challenge.js +++ b/src/services/Challenge/Challenge.js @@ -965,7 +965,7 @@ export const fetchChallenges = function ( // it into JSON first. if (!challengeData.taskWidgetLayout.workspace && challengeData.taskWidgetLayout) { try { - if (!JSON.parse(challengeData.taskWidgetLayout).workspace) { + if (!(JSON.parse(challengeData.taskWidgetLayout).workspace.name === "taskCompletion")) { throw new Error("Widget layout with the wrong format was submitted, it was not included in the save.") } challengeData.taskWidgetLayout = JSON.parse(challengeData.taskWidgetLayout) diff --git a/src/services/Widget/Widget.js b/src/services/Widget/Widget.js index 3a9827d36..cfa054a20 100644 --- a/src/services/Widget/Widget.js +++ b/src/services/Widget/Widget.js @@ -332,7 +332,7 @@ export const importRecommendedConfiguration = (recommendedLayout) => { importedConfiguration.widgets = _map(importedConfiguration.widgetKeys, key => widgetDescriptor(key)) delete importedConfiguration.widgetKeys -debugger + _each(importedConfiguration.layout, taskWidgetLayout => taskWidgetLayout.i = generateWidgetId()) return (importedConfiguration) }