Skip to content

Commit

Permalink
Merge pull request #228 from minrk/nbconvert-files
Browse files Browse the repository at this point in the history
fix files redirect in nbconvert handlers
  • Loading branch information
takluyver committed Jul 23, 2015
2 parents 854aa1a + 5714cab commit 406a57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebook/nbconvert/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def get(self, format, path):
model = self.contents_manager.get(path=path)
name = model['name']
if model['type'] != 'notebook':
raise web.HTTPError(400, "Not a notebook: %s" % path)
# not a notebook, redirect to files
return FilesRedirectHandler.redirect_to_files(self, path)

self.set_header('Last-Modified', model['last_modified'])

Expand Down Expand Up @@ -157,5 +158,4 @@ def post(self, format):
(r"/nbconvert/%s" % _format_regex, NbconvertPostHandler),
(r"/nbconvert/%s%s" % (_format_regex, path_regex),
NbconvertFileHandler),
(r"/nbconvert/html%s" % path_regex, FilesRedirectHandler),
]

0 comments on commit 406a57d

Please sign in to comment.