mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix(core): Fix issue that parameters got lost in some edge cases
This commit is contained in:
parent
eec12f28d6
commit
04f0bf5b65
|
@ -823,7 +823,7 @@ export function getNodeParameters(
|
||||||
Object.keys(propertyValues || {}).forEach((value) => {
|
Object.keys(propertyValues || {}).forEach((value) => {
|
||||||
returnValue[value] = {};
|
returnValue[value] = {};
|
||||||
});
|
});
|
||||||
return { [nodeProperties.name]: returnValue };
|
nodeParameters[nodeProperties.name] = returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Object.keys(collectionValues).length !== 0 || returnDefaults) {
|
if (Object.keys(collectionValues).length !== 0 || returnDefaults) {
|
||||||
|
|
|
@ -3010,9 +3010,15 @@ describe('Workflow', () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description:
|
description:
|
||||||
'complex type "collection" which contains a "fixedCollection" with "multipleValues: false" that has a collection value added but nothing to the fixedCollection',
|
'complex type "collection" which contains a "fixedCollection" with "multipleValues: false" that has all values set to the default values (by having it as an empty object) in combination with another value',
|
||||||
input: {
|
input: {
|
||||||
nodePropertiesArray: [
|
nodePropertiesArray: [
|
||||||
|
{
|
||||||
|
name: 'mode',
|
||||||
|
displayName: 'mode',
|
||||||
|
type: 'string',
|
||||||
|
default: 'mode1',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Options',
|
displayName: 'Options',
|
||||||
name: 'options',
|
name: 'options',
|
||||||
|
@ -3065,33 +3071,54 @@ describe('Workflow', () => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
nodeValues: {
|
nodeValues: {
|
||||||
|
mode: 'changed',
|
||||||
options: {
|
options: {
|
||||||
sort: {},
|
sort: {
|
||||||
|
value: {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
noneDisplayedFalse: {
|
noneDisplayedFalse: {
|
||||||
defaultsFalse: {
|
defaultsFalse: {
|
||||||
|
mode: 'changed',
|
||||||
options: {
|
options: {
|
||||||
sort: {},
|
sort: {
|
||||||
|
value: {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultsTrue: {
|
defaultsTrue: {
|
||||||
|
mode: 'changed',
|
||||||
options: {
|
options: {
|
||||||
sort: {},
|
sort: {
|
||||||
|
value: {
|
||||||
|
descending: true,
|
||||||
|
ordering: 'date',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
noneDisplayedTrue: {
|
noneDisplayedTrue: {
|
||||||
defaultsFalse: {
|
defaultsFalse: {
|
||||||
|
mode: 'changed',
|
||||||
options: {
|
options: {
|
||||||
sort: {},
|
sort: {
|
||||||
|
value: {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultsTrue: {
|
defaultsTrue: {
|
||||||
|
mode: 'changed',
|
||||||
options: {
|
options: {
|
||||||
sort: {},
|
sort: {
|
||||||
|
value: {
|
||||||
|
descending: true,
|
||||||
|
ordering: 'date',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue