FIX: Edit category should use the id always in case two categories have

the same slug.
This commit is contained in:
Robin Ward
2014-08-14 10:56:47 -04:00
parent a23b6f24cf
commit 4dfe5fd1ca
2 changed files with 3 additions and 4 deletions

View File

@ -114,7 +114,7 @@ var ApplicationRoute = Em.Route.extend({
Discourse.Route.showModal(router, 'editCategory', category);
router.controllerFor('editCategory').set('selectedTab', 'general');
} else {
Discourse.Category.reloadBySlugOrId(category.get('slug') || category.get('id')).then(function (c) {
Discourse.Category.reloadById(category.get('id')).then(function (c) {
Discourse.Site.current().updateCategory(c);
Discourse.Route.showModal(router, 'editCategory', c);
router.controllerFor('editCategory').set('selectedTab', 'general');