FIX: Computed property override error for webhook.categories (#25418)

This commit is contained in:
David Taylor 2024-01-25 12:25:02 +00:00 committed by GitHub
parent 5734066942
commit 241eaadc26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,9 +25,16 @@ export default class WebHook extends RestModel {
this.set("wildcard_web_hook", value === "wildcard");
}
@discourseComputed("category_ids")
categories(categoryIds) {
return Category.findByIds(categoryIds);
@computed("category_ids")
get categories() {
return Category.findByIds(this.category_ids);
}
set categories(value) {
this.set(
"category_ids",
value.map((c) => c.id)
);
}
@observes("group_ids")