Skip to content

Commit

Permalink
add check in ReportInstanceActions to fix on demand report creation a…
Browse files Browse the repository at this point in the history
…fter report definition creation (#196)

Signed-off by: David Cui <[email protected]>
  • Loading branch information
davidcui1225 authored Oct 27, 2021
1 parent 93d885c commit 56008de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ internal object ReportInstanceActions {
Metrics.REPORT_FROM_DEFINITION_ID_SYSTEM_ERROR.counter.increment()
throw OpenSearchStatusException("Report Instance Creation failed", RestStatus.INTERNAL_SERVER_ERROR)
}
if (reportDefinitionDetails.reportDefinition.delivery != null) {
if (reportDefinitionDetails.reportDefinition.delivery != null && reportDefinitionDetails.reportDefinition.delivery.configIds.isNotEmpty()) {
val reportName = reportInstance.reportDefinitionDetails!!.reportDefinition.name
val reportLink = buildReportLink(reportDefinitionDetails.reportDefinition.source.origin, reportInstance.tenant, docId)
NotificationsActions.send(reportDefinitionDetails.reportDefinition.delivery, docId, reportLink, reportName)
Expand Down

0 comments on commit 56008de

Please sign in to comment.