Skip to content

Commit

Permalink
Don't save auto-generated connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Scullin committed Mar 21, 2023
1 parent 8572ff5 commit 3e752fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/extension/browser/commands/edit_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/extension/node/commands/edit_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function handleConnectionsPreSave(
`connections.${connection.id}.password`,
connection.password as string
);
} else {
} else if (!connection.isGenerated) {
modifiedConnections.push(connection);
}
}
Expand Down

0 comments on commit 3e752fb

Please sign in to comment.