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:
149
149
context : org-global
150
150
filters :
151
151
branches :
152
- only : ['develop', 'migration-setup', 'pm-1173_1' ]
152
+ only : ['develop', 'migration-setup']
153
153
- deployProd :
154
154
context : org-global
155
155
filters :
Original file line number Diff line number Diff line change @@ -71,10 +71,17 @@ module.exports = [
71
71
const pmRole = await util . getRolesByRoleName ( USER_ROLE . PROJECT_MANAGER , req . log , req . id ) ;
72
72
const { subjects = [ ] } = await util . getRoleInfo ( pmRole [ 0 ] , req . log , req . id ) ;
73
73
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
+
75
76
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
+ } ) ;
78
85
if ( ! isCreatorPartofSubjects ) {
79
86
listOfSubjects . push ( {
80
87
email : creator [ 0 ] . email ,
You can’t perform that action at this time.
0 commit comments