DEV: Set category on embeddable-host component instead of rest object (#26374)
The rest object doesn't need the whole serialized category.
This commit is contained in:
parent
312a5ead1f
commit
bf35928a14
|
@ -53,7 +53,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<div class="label">{{i18n "admin.embedding.category"}}</div>
|
||||
{{category-badge this.host.category allowUncategorized=true}}
|
||||
{{category-badge this.category allowUncategorized=true}}
|
||||
</td>
|
||||
<td class="controls">
|
||||
<DButton @icon="pencil-alt" @action={{this.edit}} />
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class EmbeddableHost extends Component.extend(
|
|||
const categoryId = host.category_id || this.site.uncategorized_category_id;
|
||||
const category = Category.findById(categoryId);
|
||||
|
||||
host.set("category", category);
|
||||
this.set("category", category);
|
||||
}
|
||||
|
||||
@discourseComputed("buffered.host", "host.isSaving")
|
||||
|
@ -60,7 +60,7 @@ export default class EmbeddableHost extends Component.extend(
|
|||
host
|
||||
.save(props)
|
||||
.then(() => {
|
||||
host.set("category", Category.findById(this.categoryId));
|
||||
this.set("category", Category.findById(this.categoryId));
|
||||
this.set("editToggled", false);
|
||||
})
|
||||
.catch(popupAjaxError);
|
||||
|
|
Loading…
Reference in New Issue