From 3e752fb6189775e3d2f39cc04f4bd43febe85907 Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Fri, 24 Feb 2023 13:52:42 -0800 Subject: [PATCH] Don't save auto-generated connections --- src/extension/browser/commands/edit_connections.ts | 4 +++- src/extension/node/commands/edit_connections.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/extension/browser/commands/edit_connections.ts b/src/extension/browser/commands/edit_connections.ts index a306eaf1..c2b0f1c3 100644 --- a/src/extension/browser/commands/edit_connections.ts +++ b/src/extension/browser/commands/edit_connections.ts @@ -158,7 +158,9 @@ async function handleConnectionsPreSave( for (let index = 0; index < connections.length; index++) { const connection = connections[index]; connection.isDefault = index === defaultIndex; - modifiedConnections.push(connection); + if (!connection.isGenerated) { + modifiedConnections.push(connection); + } } return modifiedConnections; } diff --git a/src/extension/node/commands/edit_connections.ts b/src/extension/node/commands/edit_connections.ts index e08d301f..36fca586 100644 --- a/src/extension/node/commands/edit_connections.ts +++ b/src/extension/node/commands/edit_connections.ts @@ -185,7 +185,7 @@ async function handleConnectionsPreSave( `connections.${connection.id}.password`, connection.password as string ); - } else { + } else if (!connection.isGenerated) { modifiedConnections.push(connection); } }