mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: group categories inputs not filled sometimes
If you land on the group > manage > categories page or reload it, the fields will all be blank when there should be categories.
This commit is contained in:
@@ -176,41 +176,29 @@ const Group = RestModel.extend({
|
||||
}
|
||||
},
|
||||
|
||||
@observes("watching_category_ids")
|
||||
_updateWatchingCategories() {
|
||||
this.set(
|
||||
"watchingCategories",
|
||||
Category.findByIds(this.watching_category_ids)
|
||||
);
|
||||
@discourseComputed("watching_category_ids")
|
||||
watchingCategories(categoryIds) {
|
||||
return Category.findByIds(categoryIds);
|
||||
},
|
||||
|
||||
@observes("tracking_category_ids")
|
||||
_updateTrackingCategories() {
|
||||
this.set(
|
||||
"trackingCategories",
|
||||
Category.findByIds(this.tracking_category_ids)
|
||||
);
|
||||
@discourseComputed("tracking_category_ids")
|
||||
trackingCategories(categoryIds) {
|
||||
return Category.findByIds(categoryIds);
|
||||
},
|
||||
|
||||
@observes("watching_first_post_category_ids")
|
||||
_updateWatchingFirstPostCategories() {
|
||||
this.set(
|
||||
"watchingFirstPostCategories",
|
||||
Category.findByIds(this.watching_first_post_category_ids)
|
||||
);
|
||||
@discourseComputed("watching_first_post_category_ids")
|
||||
watchingFirstPostCategories(categoryIds) {
|
||||
return Category.findByIds(categoryIds);
|
||||
},
|
||||
|
||||
@observes("regular_category_ids")
|
||||
_updateRegularCategories() {
|
||||
this.set(
|
||||
"regularCategories",
|
||||
Category.findByIds(this.regular_category_ids)
|
||||
);
|
||||
@discourseComputed("regular_category_ids")
|
||||
regularCategories(categoryIds) {
|
||||
return Category.findByIds(categoryIds);
|
||||
},
|
||||
|
||||
@observes("muted_category_ids")
|
||||
_updateMutedCategories() {
|
||||
this.set("mutedCategories", Category.findByIds(this.muted_category_ids));
|
||||
@discourseComputed("muted_category_ids")
|
||||
mutedCategories(categoryIds) {
|
||||
return Category.findByIds(categoryIds);
|
||||
},
|
||||
|
||||
asJSON() {
|
||||
|
||||
Reference in New Issue
Block a user