mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:23:17 -05:00
FIX: tags need to be an array of strings for SchemaSettingTypeTags (#37643)
Reported here: https://meta.discourse.org/t/cannot-add-sidebar-via-objects-setting-editor/395567 Objects were getting passed instead of strings, and `SchemaSettingsObjectValidator` expects an array of strings, not an array of objects. The fix is similar to what we do for categories here: https://github.com/discourse/discourse/blob/cb379b8605ad61353482f1d7eb554ed9282ac81c/frontend/discourse/admin/components/schema-setting/types/categories.gjs#L28-L33
This commit is contained in:
@@ -13,6 +13,10 @@ export default class SchemaSettingTypeTags extends SchemaSettingTypeModels {
|
||||
};
|
||||
}
|
||||
|
||||
onChange(tags) {
|
||||
return tags.map((tag) => tag.name);
|
||||
}
|
||||
|
||||
<template>
|
||||
<TagChooser
|
||||
@tags={{this.value}}
|
||||
|
||||
Reference in New Issue
Block a user