Skip to content

Commit

Permalink
Merge pull request #1357 from lowcoder-org/fix/querylibrary
Browse files Browse the repository at this point in the history
Fixed null pointer exception when there is streamApi query library ty…
  • Loading branch information
FalkWolsky authored Nov 29, 2024
2 parents 905e616 + 98d1f18 commit e3febbd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ private Flux<LibraryQuery> getByOrgIdWithDatasourcePermissions(String orgId) {
Flux<LibraryQuery> libraryQueryFlux = libraryQueryService.getByOrganizationId(orgId)
.cache();

Mono<List<String>> datasourceIdListMono = libraryQueryFlux.map(libraryQuery -> libraryQuery.getQuery().getDatasourceId())
Mono<List<String>> datasourceIdListMono = libraryQueryFlux.map(libraryQuery -> {
var datasourceId = libraryQuery.getQuery().getDatasourceId();
return Objects.requireNonNullElse(datasourceId, "");
})
.filter(StringUtils::isNotBlank)
.collectList()
.cache();
Expand Down

0 comments on commit e3febbd

Please sign in to comment.