##// END OF EJS Templates
notebooks should always have one checkpoint...
MinRK -
Show More
@@ -222,6 +222,10 b' class FileNotebookManager(NotebookManager):'
222
222
223 if 'content' not in model:
223 if 'content' not in model:
224 raise web.HTTPError(400, u'No notebook JSON data provided')
224 raise web.HTTPError(400, u'No notebook JSON data provided')
225
226 # One checkpoint should always exist
227 if self.notebook_exists(name, path) and not self.list_checkpoints(name, path):
228 self.create_checkpoint(name, path)
225
229
226 new_path = model.get('path', path).strip('/')
230 new_path = model.get('path', path).strip('/')
227 new_name = model.get('name', name)
231 new_name = model.get('name', name)
@@ -117,7 +117,7 b' class NotebookManager(LoggingConfigurable):'
117 raise NotImplementedError('must be implemented in a subclass')
117 raise NotImplementedError('must be implemented in a subclass')
118
118
119 def create_notebook_model(self, model=None, path=''):
119 def create_notebook_model(self, model=None, path=''):
120 """Create a new untitled notebook and return its model with no content."""
120 """Create a new notebook and return its model with no content."""
121 path = path.strip('/')
121 path = path.strip('/')
122 if model is None:
122 if model is None:
123 model = {}
123 model = {}
General Comments 0
You need to be logged in to leave comments. Login now