diff --git a/src/schema/mutations/AddBot.js b/src/schema/mutations/AddBot.js index d269a1d5f..a3fba7964 100644 --- a/src/schema/mutations/AddBot.js +++ b/src/schema/mutations/AddBot.js @@ -29,7 +29,7 @@ const resolve = async (parent, { bot }, context) => { if (auxProduct.codeName === bot.productCodeName) { newBotClone = { displayName: auxBot.displayName, - codeName: auxBot.codeName + '-' + bot.cloneId, + codeName: auxBot.codeName, type: auxBot.type, profilePicture: auxBot.profilePicture, cloneId: bot.cloneId, diff --git a/src/schema/mutations/RemoveBot.js b/src/schema/mutations/RemoveBot.js index a09ce89f1..68e093e27 100644 --- a/src/schema/mutations/RemoveBot.js +++ b/src/schema/mutations/RemoveBot.js @@ -23,7 +23,7 @@ const resolve = async (parent, { bot }, context) => { if (auxTeam.codeName === bot.devTeam) { for (let j = 0; j < auxTeam.bots.length; j++) { const auxBot = auxTeam.bots[j] - if (auxBot.codeName + '-' + bot.cloneId === bot.codeName) { + if (auxBot.codeName === bot.codeName && auxBot.cloneId === bot.cloneId) { for (let k = 0; k < auxBot.products.length; k++) { const auxProduct = auxBot.products[k] if (auxProduct.codeName === bot.productCodeName) {