creating new category was broken

This commit is contained in:
Sam Saffron 2015-04-16 15:10:55 +10:00
parent 67ed6b1e9a
commit c2dd9564b3
1 changed files with 4 additions and 2 deletions

View File

@ -46,11 +46,13 @@ Discourse.DiscoveryCategoriesRoute = Discourse.Route.extend(Discourse.OpenCompos
const groups = this.site.groups,
everyoneName = groups.findBy('id', 0).name;
showModal('editCategory', Discourse.Category.create({
const model = Discourse.Category.create({
color: 'AB9364', text_color: 'FFFFFF', group_permissions: [{group_name: everyoneName, permission_type: 1}],
available_groups: groups.map(g => g.name),
allow_badges: true
}));
});
showModal('editCategory', { model });
this.controllerFor('editCategory').set('selectedTab', 'general');
},