1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-11-10 12:35:46 +03:00

🐛 Fix bug that workflow names could have spaces in beginning and end

This commit is contained in:
Jan Oberhauser 2019-07-25 15:21:57 +02:00
parent 7aff08cc8a
commit 0c89445682
2 changed files with 2 additions and 1 deletions

View File

@ -181,6 +181,7 @@ class App {
const newWorkflowData = req.body; const newWorkflowData = req.body;
newWorkflowData.name = newWorkflowData.name.trim();
newWorkflowData.createdAt = this.getCurrentDate(); newWorkflowData.createdAt = this.getCurrentDate();
newWorkflowData.updatedAt = this.getCurrentDate(); newWorkflowData.updatedAt = this.getCurrentDate();

View File

@ -399,7 +399,7 @@ export const workflowHelpers = mixins(
if (currentWorkflow === undefined || withNewName === true) { if (currentWorkflow === undefined || withNewName === true) {
// Workflow is new or is supposed to get saved under a new name // Workflow is new or is supposed to get saved under a new name
// so create a new entry in database // so create a new entry in database
workflowData.name = workflowName as string; workflowData.name = workflowName.trim() as string;
if (withNewName === true) { if (withNewName === true) {
// If an existing workflow gets resaved with a new name // If an existing workflow gets resaved with a new name