Skip to content

Fix preset dropdown always defaulting to 'no preset'#2401

Merged
canstudios-nicolaw merged 2 commits intoadaptlearning:release/bugpatchfrom
CanStudios:issue/2379-2
Aug 16, 2019
Merged

Fix preset dropdown always defaulting to 'no preset'#2401
canstudios-nicolaw merged 2 commits intoadaptlearning:release/bugpatchfrom
CanStudios:issue/2379-2

Conversation

@canstudios-nicolaw
Copy link
Copy Markdown
Contributor

Fixes #2379

In https://github.com/adaptlearning/adapt_authoring/pull/2371/files in plugins/content/config/index.js the following was removed

var configModel = records[0].toObject();
configModel._enabledComponents = uniqueComponentList;
return next(null, [configModel]);

and replaced with

return next(null, [records[0]]);

This missing .toObject led to the following change 33600c3#diff-6cb64d73a547a24bfc001f80bb7192dc

These two things meant that the _themePreset value was no longer being saved. Fixing these things allows the last selected preset to be saved successfully which fixes this issue.

To test
Select a theme
Select a preset
Save
Open theme editing page, theme and preset should be selected
Change theme
Return to original theme, preset should be selected

@canstudios-nicolaw canstudios-nicolaw added this to the Bugpatch milestone Jul 30, 2019
@canstudios-nicolaw canstudios-nicolaw self-assigned this Jul 30, 2019
@canstudios-nicolaw canstudios-nicolaw merged commit 6a18942 into adaptlearning:release/bugpatch Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants