mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit 43a2622b97
)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
This commit is contained in:
parent
604ad8eb2c
commit
cd88dc09b5
1 changed files with 3 additions and 2 deletions
|
@ -372,9 +372,10 @@ class PackagePolicyService {
|
|||
}
|
||||
// Check that the name does not exist already but exclude the current package policy
|
||||
const existingPoliciesWithName = await this.list(soClient, {
|
||||
perPage: 1,
|
||||
kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.name: "${packagePolicy.name}"`,
|
||||
perPage: SO_SEARCH_LIMIT,
|
||||
kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.name:"${packagePolicy.name}"`,
|
||||
});
|
||||
|
||||
const filtered = (existingPoliciesWithName?.items || []).filter((p) => p.id !== id);
|
||||
|
||||
if (filtered.length > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue