From 767942ccf4d2b1d2e320c916fd68ab0cc97fdca2 Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Mon, 12 Sep 2016 12:30:20 -0700 Subject: [PATCH] Upgrade cell's `editable` and `deletable` metadata if not defined --- notebook/static/notebook/js/cell.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notebook/static/notebook/js/cell.js b/notebook/static/notebook/js/cell.js index 1dda6167cd..70134447d8 100644 --- a/notebook/static/notebook/js/cell.js +++ b/notebook/static/notebook/js/cell.js @@ -494,6 +494,14 @@ define([ if (data.metadata !== undefined) { this.metadata = data.metadata; } + // upgrade cell's editable metadata if not defined + if (this.metadata.editable === undefined) { + this.metadata.editable = this.is_editable(); + } + // upgrade cell's deletable metadata if not defined + if (this.metadata.deletable === undefined) { + this.metadata.deletable = this.is_deletable(); + } };