File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/routes/projectMembers Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ module.exports = [
119119 let updatedProps = req . body ;
120120 const projectId = _ . parseInt ( req . params . projectId ) ;
121121 const memberRecordId = _ . parseInt ( req . params . id ) ;
122+ const action = updatedProps . action ;
122123 updatedProps = _ . pick ( updatedProps , [ 'isPrimary' , 'role' ] ) ;
123124 const fields = req . query . fields ? req . query . fields . split ( ',' ) : null ;
124125
@@ -153,7 +154,7 @@ module.exports = [
153154 req . log . debug ( `updated props ${ JSON . stringify ( updatedProps ) } ` ) ;
154155 req . log . debug ( `previous values ${ JSON . stringify ( previousValue ) } ` ) ;
155156 // no updates if no change
156- if ( ( updatedProps . role === previousValue . role || updatedProps . action === 'overwrite' ) &&
157+ if ( ( updatedProps . role === previousValue . role || action === 'overwrite' ) &&
157158 ( _ . isUndefined ( updatedProps . isPrimary ) ||
158159 updatedProps . isPrimary === previousValue . isPrimary ) ) {
159160 await completeAllCopilotRequests ( req , projectId , _transaction ) ;
You can’t perform that action at this time.
0 commit comments