Skip to content

Commit

Permalink
fix: prevent null pointer in change detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwwinter committed Oct 25, 2024
1 parent fe19e7d commit 945167e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ class DefaultReportDocumentChangeEventConsumer(

// todo if aggregationDefinition is different, skip trigger ReportCalculation

val reportRef = payload.currentVersion["_id"] as String
val reportRef = try {
payload.currentVersion["_id"] as String
} catch (ex: Exception) {
logger.warn(ex.message, ex)
return
}

createReportCalculationUseCase.createReportCalculation(
request = CreateReportCalculationRequest(
Expand Down

0 comments on commit 945167e

Please sign in to comment.