From 33600c3cc30c42ff6709996b0ddbfe997b14929e Mon Sep 17 00:00:00 2001 From: nicola Date: Tue, 9 Jul 2019 09:12:54 +0100 Subject: [PATCH] Fix - changing theme gives front end error --- plugins/content/themepreset/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/content/themepreset/index.js b/plugins/content/themepreset/index.js index 546aa2d4d9..98da572811 100644 --- a/plugins/content/themepreset/index.js +++ b/plugins/content/themepreset/index.js @@ -31,7 +31,7 @@ ThemePresetContent.prototype.updatePreset = function(presetId, courseId, res, ne } delta._courseId = courseId; - app.contentmanager.update('config', { _courseId: courseId }, delta, function(err) { + app.contentmanager.update('config', { _courseId: courseId }, JSON.stringify(delta), function(err) { if (err) return next(err); // lose any previously set theme settings, preset overrides app.contentmanager.update('course', { _id: courseId }, { _courseId: courseId, themeSettings: null }, function(err) {