fix(core): Prevent workflow history saving error from happening (#7812)

When performing actions such as renaming a workflow or updating its
settings, n8n errors with "Failed to save workflow version" in the
console although the saving process was successful. We are now correctly
checking whether `nodes` and `connections` exist and only then save a
snapshot.

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Omar Ajoue
2023-12-13 11:41:06 +00:00
committed by GitHub
parent b00b9057a4
commit e5581ce802
6 changed files with 290 additions and 158 deletions

View File

@@ -193,7 +193,7 @@ function generateCredentialEntity(credentialId: string) {
return credentialEntity;
}
function getWorkflow(options?: {
export function getWorkflow(options?: {
addNodeWithoutCreds?: boolean;
addNodeWithOneCred?: boolean;
addNodeWithTwoCreds?: boolean;