From 0062ddb851cc18531c42d42936d9e73a16b23de5 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Tue, 6 Jul 2021 19:27:41 +0000 Subject: [PATCH] Fix notebooks context menu Signed-off-by: Joshua Li --- dashboards-reports/server/routes/report.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/dashboards-reports/server/routes/report.ts b/dashboards-reports/server/routes/report.ts index b49ad41b..b2a88658 100644 --- a/dashboards-reports/server/routes/report.ts +++ b/dashboards-reports/server/routes/report.ts @@ -93,19 +93,12 @@ export default function (router: IRouter, accessInfo: AccessInfoType) { // if not deliver to user himself , no need to send actual file data to client const delivery = report.report_definition.delivery; addToMetric('report', 'create', 'count', report); - if ( - delivery.delivery_type === DELIVERY_TYPE.opensearchDashboardsUser && - delivery.delivery_params.opensearch_dashboards_recipients.length === 0 - ) { - return response.ok({ - body: { - data: reportData.dataUrl, - filename: reportData.fileName, - }, - }); - } else { - return response.ok(); - } + return response.ok({ + body: { + data: reportData.dataUrl, + filename: reportData.fileName, + }, + }); } catch (error) { // TODO: better error handling for delivery and stages in generating report, pass logger to deeper level logger.error(`Failed to generate report: ${error}`);