Addressed PR suggestions

This commit is contained in:
Carlos Monastyrski
2025-07-18 15:32:22 -03:00
parent cf6b9d8905
commit a064fae94e
5 changed files with 142 additions and 57 deletions
@@ -346,7 +346,7 @@ const createBatchModeStore: StateCreator<CombinedState, [], [], BatchModeState>
if (change.resourceType === "secret") {
const existingSecret =
state.existingSecretKeys.has(change.secretKey) ||
newChanges.secrets.some((s) => s.secretKey === change.secretKey);
newChanges.secrets.some((s) => (s.secretKey === change.secretKey && s.type !== PendingAction.Create) || (change.type === PendingAction.Create && change.originalKey !== change.secretKey && s.secretKey === change.secretKey));
if (change.type === PendingAction.Create && existingSecret) {
return { pendingChanges: newChanges };