From 56320588da41cf768d46da7ec1b4302731bc60ad Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 13 Nov 2014 12:20:53 -0800 Subject: [PATCH] Return JSON from contents API checkpoint methods --- IPython/html/static/notebook/js/notebook.js | 2 -- IPython/html/static/services/contents.js | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 09e668bbf..643818d78 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -2341,7 +2341,6 @@ define([ * @param {Object} data JSON representation of a checkpoint */ Notebook.prototype.list_checkpoints_success = function (data) { - data = $.parseJSON(data); this.checkpoints = data; if (data.length) { this.last_checkpoint = data[data.length - 1]; @@ -2373,7 +2372,6 @@ define([ * @param {Object} data JSON representation of a checkpoint */ Notebook.prototype.create_checkpoint_success = function (data) { - data = $.parseJSON(data); this.add_checkpoint(data); this.events.trigger('checkpoint_created.Notebook', data); }; diff --git a/IPython/html/static/services/contents.js b/IPython/html/static/services/contents.js index b90714d87..c2ee4ba35 100644 --- a/IPython/html/static/services/contents.js +++ b/IPython/html/static/services/contents.js @@ -183,6 +183,7 @@ define([ var url = this.api_url(path, 'checkpoints'); var settings = { type : "POST", + dataType : "json", }; return utils.promising_ajax(url, settings); }; @@ -191,6 +192,8 @@ define([ var url = this.api_url(path, 'checkpoints'); var settings = { type : "GET", + cache: false, + dataType: "json", }; return utils.promising_ajax(url, settings); };