Merge pull request #1836 from akhilmhdh/fix/create-secret-fail-reference

fix: resolved create secret failing for reference
This commit is contained in:
Maidul Islam
2024-05-15 22:34:37 -04:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -520,7 +520,8 @@ export const fnSecretBulkInsert = async ({
inputSecrets.map(({ references = [], secretBlindIndex }) => ({
secretId: newSecretGroupByBlindIndex[secretBlindIndex as string][0].id,
references
}))
})),
tx
);
if (newSecretTags.length) {
const secTags = await secretTagDAL.saveTagsToSecret(newSecretTags, tx);
@@ -565,7 +566,8 @@ export const fnSecretBulkUpdate = async ({
.map(({ data: { references = [] } }, i) => ({
secretId: newSecrets[i].id,
references
}))
})),
tx
);
const secsUpdatedTag = inputSecrets.flatMap(({ data: { tags } }, i) =>
tags !== undefined ? { tags, secretId: newSecrets[i].id } : []

View File

@@ -1596,7 +1596,8 @@ export const secretServiceFactory = ({
key: botKey
})
)
}))
})),
tx
);
});