fixed filesize

This commit is contained in:
Celina Kilcrease 2018-04-17 11:45:07 -04:00
parent 42c3c02f95
commit d19f97017f

View File

@ -389,15 +389,15 @@ class FileContentsManager(FileManagerMixin, ContentsManager):
"""
model = self._base_model(path)
model['type'] = 'notebook'
os_path = self._get_os_path(path)
model['size'] = self._get_file_size(os_path)
if content:
os_path = self._get_os_path(path)
nb = self._read_notebook(os_path, as_version=4)
self.mark_trusted_cells(nb, path)
model['content'] = nb
model['format'] = 'json'
model['size'] = self._get_file_size(os_path)
self.validate_notebook_model(model)