Show More
@@ -151,8 +151,8 class NotebookManager(LoggingConfigurable): | |||||
151 | nb = current.reads(s, u'json') |
|
151 | nb = current.reads(s, u'json') | |
152 | except: |
|
152 | except: | |
153 | raise web.HTTPError(500, u'Unreadable JSON notebook.') |
|
153 | raise web.HTTPError(500, u'Unreadable JSON notebook.') | |
154 | if 'name' not in nb: |
|
154 | # Always use the filename as the notebook name. | |
155 |
|
|
155 | nb.metadata.name = os.path.split(path)[-1].split(u'.')[0] | |
156 | return last_modified, nb |
|
156 | return last_modified, nb | |
157 |
|
157 | |||
158 | def save_new_notebook(self, data, name=None, format=u'json'): |
|
158 | def save_new_notebook(self, data, name=None, format=u'json'): |
General Comments 0
You need to be logged in to leave comments.
Login now