🐛 Fix issue that default values did not get send for credential

testing
This commit is contained in:
Jan Oberhauser 2022-01-24 17:37:07 +01:00
parent d22c0deea4
commit 6a77969cff

View file

@ -552,19 +552,11 @@ export default mixins(showMessage, nodeHelpers).extend({
(access) => !!access, (access) => !!access,
) as ICredentialNodeAccess[]; ) as ICredentialNodeAccess[];
// Save only the none default data
const data = NodeHelpers.getNodeParameters(
this.credentialType!.properties,
this.credentialData as INodeParameters,
false,
false,
);
const details: ICredentialsDecrypted = { const details: ICredentialsDecrypted = {
id: this.credentialId, id: this.credentialId,
name: this.credentialName, name: this.credentialName,
type: this.credentialTypeName!, type: this.credentialTypeName!,
data: data as unknown as ICredentialDataDecryptedObject, data: this.credentialData,
nodesAccess, nodesAccess,
}; };
@ -635,6 +627,10 @@ export default mixins(showMessage, nodeHelpers).extend({
if (this.isCredentialTestable) { if (this.isCredentialTestable) {
this.isTesting = true; this.isTesting = true;
// Add the full data including defaults for testing
credentialDetails.data = this.credentialData;
await this.testCredential(credentialDetails); await this.testCredential(credentialDetails);
this.isTesting = false; this.isTesting = false;
} }