FIX: on create you could not add a theme component

This commit is contained in:
Sam 2017-04-20 17:37:13 -04:00
parent dcf9459b7c
commit a9b953ac5a

View File

@ -73,6 +73,10 @@ const Theme = RestModel.extend({
addChildTheme(theme){
let childThemes = this.get("childThemes");
if (!childThemes) {
childThemes = [];
this.set('childThemes', childThemes);
}
childThemes.removeObject(theme);
childThemes.pushObject(theme);
return this.saveChanges("child_theme_ids");