File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
packages/backend/src/graphql/mutations Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const duplicateBranch: MutationResolvers['duplicateBranch'] = async (
2525 } )
2626 . throwIfNotFound ( )
2727
28- flow . assertNotUpdatedSince ( input . flow . updatedAt )
28+ flow . assertNotUpdatedSince ( input . flow . updatedAt , context . currentUser . id )
2929
3030 // create all the steps in the transaction so that if any fails
3131 // this entire query fails
@@ -90,7 +90,11 @@ const duplicateBranch: MutationResolvers['duplicateBranch'] = async (
9090 // was created in the original branch
9191 }
9292
93- const updatedFlow = await flow . patchLastUpdated ( { flowId : flow . id , trx } )
93+ const updatedFlow = await flow . patchLastUpdated ( {
94+ flowId : flow . id ,
95+ updatedBy : context . currentUser . id ,
96+ trx,
97+ } )
9498
9599 return {
96100 steps : newSteps ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const updateFlowStatus: MutationResolvers['updateFlowStatus'] = async (
5252 return flow
5353 }
5454
55- flow . assertNotUpdatedSince ( params . input . updatedAt )
55+ flow . assertNotUpdatedSince ( params . input . updatedAt , context . currentUser . id )
5656
5757 if ( params . input . active ) {
5858 validateFlowSteps ( flow . steps )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const updateStepPositions: MutationResolvers['updateStepPositions'] = async (
5050 }
5151
5252 const flow = steps [ 0 ] . flow
53- flow . assertNotUpdatedSince ( input . flow . updatedAt )
53+ flow . assertNotUpdatedSince ( input . flow . updatedAt , context . currentUser . id )
5454
5555 const foundStepIds = steps . map ( ( step ) => step . id )
5656 const missingStepIds = stepIds . filter (
You can’t perform that action at this time.
0 commit comments