Skip to content

Commit

Permalink
fix(entity-service): fix findFirst when already present (#10187)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Apr 2, 2024
1 parent e0b20e1 commit 4bba834
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ public IngestResult ingestProposal(
AspectsBatchImpl.builder().mcps(List.of(proposal), auditStamp, this).build(), async)
.stream()
.findFirst()
.get();
.orElse(null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private void updateAspect(
final IngestResult ingestProposalResult =
_entityService.ingestProposal(proposal, auditStamp, false);

if (!ingestProposalResult.isSqlCommitted()) {
if (ingestProposalResult != null && !ingestProposalResult.isSqlCommitted()) {
log.error(
"Failed to ingest aspect with references removed. Before {}, after: {}, please check MCP processor"
+ " logs for more information",
Expand Down

0 comments on commit 4bba834

Please sign in to comment.