Skip to content

Commit 3ae3ad4

Browse files
Rakib AnsaryRakib Ansary
Rakib Ansary
authored and
Rakib Ansary
committed
fix: skip check
Signed-off-by: Rakib Ansary <[email protected]>
1 parent 1d568a5 commit 3ae3ad4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

config/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@ module.exports = {
131131
GRPC_ACL_SERVER_HOST: process.env.GRPC_ACL_SERVER_HOST || "localhost",
132132
GRPC_ACL_SERVER_PORT: process.env.GRPC_ACL_SERVER_PORT || 8889,
133133

134-
SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID: ['517e76b0-8824-4e72-9b48-a1ebde1793a8']
134+
SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID: process.env.SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID || '517e76b0-8824-4e72-9b48-a1ebde1793a8'
135135
};

src/common/challenge-helper.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,9 @@ class ChallengeHelper {
530530
}
531531

532532
isProjectIdRequired(timelineTemplateId) {
533-
if (
534-
_.isNull(timelineTemplateId) ||
535-
_.isUndefined(timelineTemplateId) ||
536-
!_.includes(config.SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID, timelineTemplateId)
537-
)
538-
return true;
539-
return false;
533+
const template = _.get(config, "SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID", '517e76b0-8824-4e72-9b48-a1ebde1793a8');
534+
535+
return template !== timelineTemplateId;
540536
}
541537
}
542538

0 commit comments

Comments
 (0)