mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
🐛 Fix bug that workflow names could have spaces in beginning and end
This commit is contained in:
@@ -181,6 +181,7 @@ class App {
|
||||
|
||||
const newWorkflowData = req.body;
|
||||
|
||||
newWorkflowData.name = newWorkflowData.name.trim();
|
||||
newWorkflowData.createdAt = this.getCurrentDate();
|
||||
newWorkflowData.updatedAt = this.getCurrentDate();
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ export const workflowHelpers = mixins(
|
||||
if (currentWorkflow === undefined || withNewName === true) {
|
||||
// Workflow is new or is supposed to get saved under a new name
|
||||
// so create a new entry in database
|
||||
workflowData.name = workflowName as string;
|
||||
workflowData.name = workflowName.trim() as string;
|
||||
|
||||
if (withNewName === true) {
|
||||
// If an existing workflow gets resaved with a new name
|
||||
|
||||
Reference in New Issue
Block a user