Skip to content

Commit

Permalink
null check for codeAnalysisRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-rawat-akto committed Sep 18, 2024
1 parent 1ca3565 commit 445f00b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ public void setCodeAnalysisApisList(List<CodeAnalysisApi> codeAnalysisApisList)
List<CodeAnalysisRepo> reposToRun = new ArrayList<>();
public String updateRepoLastRun() {
Bson sourceCodeFilter;
if (codeAnalysisRepo == null) {
loggerMaker.errorAndAddToDb("Code analysis repo is null", LogDb.DASHBOARD);
addActionError("Code analysis repo is null");
return ERROR.toUpperCase();
}

if (this.codeAnalysisRepo.getSourceCodeType() == CodeAnalysisRepo.SourceCodeType.BITBUCKET) {
sourceCodeFilter = Filters.or(
Filters.eq(CodeAnalysisRepo.SOURCE_CODE_TYPE, this.codeAnalysisRepo.getSourceCodeType()),
Expand Down

0 comments on commit 445f00b

Please sign in to comment.