mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
🐛 Fix error when opening ftp/sftp credentials (#2298)
* n8n-2513 fix error when opening credentials * clean up validation logic
This commit is contained in:
@@ -208,14 +208,16 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
activeNode: this.$store.getters.activeNode,
|
||||
});
|
||||
|
||||
if (this.credentialId) {
|
||||
if (!this.requiredPropertiesFilled) {
|
||||
this.showValidationWarning = true;
|
||||
setTimeout(() => {
|
||||
if (this.credentialId) {
|
||||
if (!this.requiredPropertiesFilled) {
|
||||
this.showValidationWarning = true;
|
||||
}
|
||||
else {
|
||||
this.retestCredential();
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.retestCredential();
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
|
||||
this.loading = false;
|
||||
},
|
||||
@@ -329,7 +331,11 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!this.credentialData[property.name]) {
|
||||
if (property.type === 'string' && !this.credentialData[property.name]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (property.type === 'number' && typeof this.credentialData[property.name] !== 'number') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user