don't test for .ipynb in redirect handler

regex already guarantees it
This commit is contained in:
MinRK 2013-04-12 15:07:54 -07:00
parent 10b209f93e
commit 296587664d

View File

@ -614,8 +614,8 @@ class NotebookRedirectHandler(AuthenticatedHandler):
@authenticate_unless_readonly
def get(self, notebook_name):
app = self.application
if notebook_name.endswith('.ipynb'):
notebook_name = notebook_name[:-6]
# strip trailing .ipynb:
notebook_name = os.path.splitext(notebook_name)[0]
notebook_id = app.notebook_manager.rev_mapping.get(notebook_name, '')
if notebook_id:
url = self.settings.get('base_project_url', '/') + notebook_id