File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/routes/copilotOpportunityApply Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ workflows:
149149 context : org-global
150150 filters :
151151 branches :
152- only : ['develop', 'migration-setup', 'pm-1173_1' ]
152+ only : ['develop', 'migration-setup']
153153 - deployProd :
154154 context : org-global
155155 filters :
Original file line number Diff line number Diff line change @@ -71,10 +71,17 @@ module.exports = [
7171 const pmRole = await util . getRolesByRoleName ( USER_ROLE . PROJECT_MANAGER , req . log , req . id ) ;
7272 const { subjects = [ ] } = await util . getRoleInfo ( pmRole [ 0 ] , req . log , req . id ) ;
7373
74- const creator = await util . getMemberDetailsByUserIds ( [ opportunity . userId ] , req . log , req . id ) ;
74+ const creator = await util . getMemberDetailsByUserIds ( [ opportunity . createdBy ] , req . log , req . id ) ;
75+
7576 const listOfSubjects = subjects ;
76- if ( creator ) {
77- const isCreatorPartofSubjects = subjects . find ( item => item . email . toLowerCase ( ) === creator [ 0 ] . email . toLowerCase ( ) ) ;
77+ if ( creator && creator [ 0 ] && creator [ 0 ] . email ) {
78+ const isCreatorPartofSubjects = subjects . find ( item => {
79+ if ( ! item . email ) {
80+ return false ;
81+ }
82+
83+ return item . email . toLowerCase ( ) === creator [ 0 ] . email . toLowerCase ( ) ;
84+ } ) ;
7885 if ( ! isCreatorPartofSubjects ) {
7986 listOfSubjects . push ( {
8087 email : creator [ 0 ] . email ,
You can’t perform that action at this time.
0 commit comments