Show More
@@ -236,9 +236,11 b' def downgrade(nb):' | |||||
236 | cells = [ downgrade_cell(cell) for cell in nb.pop('cells') ] |
|
236 | cells = [ downgrade_cell(cell) for cell in nb.pop('cells') ] | |
237 | nb.worksheets = [v3.new_worksheet(cells=cells)] |
|
237 | nb.worksheets = [v3.new_worksheet(cells=cells)] | |
238 | nb.metadata.setdefault('name', '') |
|
238 | nb.metadata.setdefault('name', '') | |
239 | nb.metadata.pop('orig_nbformat', None) |
|
239 | ||
240 | nb.metadata.pop('orig_nbformat_minor', None) |
|
|||
241 |
|
||||
242 | # Validate the converted notebook before returning it |
|
240 | # Validate the converted notebook before returning it | |
243 | _warn_if_invalid(nb, v3.nbformat) |
|
241 | _warn_if_invalid(nb, v3.nbformat) | |
|
242 | ||||
|
243 | nb.orig_nbformat = nb.metadata.pop('orig_nbformat', nbformat) | |||
|
244 | nb.orig_nbformat_minor = nb.metadata.pop('orig_nbformat_minor', nbformat_minor) | |||
|
245 | ||||
244 | return nb |
|
246 | return nb |
General Comments 0
You need to be logged in to leave comments.
Login now