File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -440,17 +440,17 @@ export async function createWorkflowRecord(params: CreateWorkflowInput) {
440440 eq ( workflowTable . workspaceId , workspaceId ) ,
441441 isNull ( workflowTable . archivedAt ) ,
442442 eq ( workflowTable . name , name ) ,
443- ...( folderId
444- ? [ eq ( workflowTable . folderId , folderId ) ]
445- : [ isNull ( workflowTable . folderId ) ] ) ,
443+ ...( folderId ? [ eq ( workflowTable . folderId , folderId ) ] : [ isNull ( workflowTable . folderId ) ] ) ,
446444 ]
447445 const [ duplicateWorkflow ] = await db
448446 . select ( { id : workflowTable . id } )
449447 . from ( workflowTable )
450448 . where ( and ( ...duplicateConditions ) )
451449 . limit ( 1 )
452450 if ( duplicateWorkflow ) {
453- throw new Error ( `A workflow named "${ name } " already exists in this folder. Use a different name.` )
451+ throw new Error (
452+ `A workflow named "${ name } " already exists in this folder. Use a different name.`
453+ )
454454 }
455455
456456 const workflowParentCondition = folderId
You can’t perform that action at this time.
0 commit comments