From 6d37329e7407873e20a17b45762d9651c6780439 Mon Sep 17 00:00:00 2001 From: Kevin Cunnane Date: Mon, 11 Feb 2019 15:18:54 -0800 Subject: [PATCH] Fix #3989 notebook execution count should start empty (#4004) - Fixed issues where we missed using actual execution count / starting from empty on this. --- src/sql/parts/notebook/models/notebookModel.ts | 2 +- src/sql/workbench/services/notebook/common/sqlSessionManager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/parts/notebook/models/notebookModel.ts b/src/sql/parts/notebook/models/notebookModel.ts index fb2e8aeeb9..c2e91b8554 100644 --- a/src/sql/parts/notebook/models/notebookModel.ts +++ b/src/sql/parts/notebook/models/notebookModel.ts @@ -315,7 +315,7 @@ export class NotebookModel extends Disposable implements INotebookModel { cell_type: cellType, source: '', metadata: {}, - execution_count: 1 + execution_count: undefined }; return this.notebookOptions.factory.createCell(singleCell, { notebook: this, isTrusted: true }); } diff --git a/src/sql/workbench/services/notebook/common/sqlSessionManager.ts b/src/sql/workbench/services/notebook/common/sqlSessionManager.ts index c616eaca6f..8271f24126 100644 --- a/src/sql/workbench/services/notebook/common/sqlSessionManager.ts +++ b/src/sql/workbench/services/notebook/common/sqlSessionManager.ts @@ -357,7 +357,7 @@ export class SQLFuture extends Disposable implements FutureInternal { content: { output_type: 'execute_result', metadata: {}, - execution_count: 1, + execution_count: this._executionCount, data: { 'application/vnd.dataresource+json': this.convertToDataResource(columns, d), 'text/html': this.convertToHtmlTable(columns, d) } }, metadata: undefined,