Permalink
Browse files

Merge pull request #1816 from ellisonbg/nbname

Always use filename as the notebook name.
  • Loading branch information...
2 parents 8a438b4 + 8112e4d commit 2ec1c56baae87635b53b7c1958a843d3cbbbaa7d @ellisonbg ellisonbg committed Jun 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/frontend/html/notebook/notebookmanager.py
@@ -151,8 +151,8 @@ def get_notebook_object(self, notebook_id):
nb = current.reads(s, u'json')
except:
raise web.HTTPError(500, u'Unreadable JSON notebook.')
- if 'name' not in nb:
- nb.name = os.path.split(path)[-1].split(u'.')[0]
+ # Always use the filename as the notebook name.
+ nb.metadata.name = os.path.split(path)[-1].split(u'.')[0]
return last_modified, nb
def save_new_notebook(self, data, name=None, format=u'json'):

0 comments on commit 2ec1c56

Please sign in to comment.