Fixing clone id name

This commit is contained in:
Matias committed 2019-07-05 17:56:55 -03:00
1 parent 2b7f4eaed4
commit afb5a35269
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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) {