Commit b5954b39 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Fix bug in update_dict()

parent a4551db1
......@@ -48,6 +48,12 @@ class NbCourse:
'slug_title': 'course',
'output_dir': 'build',
'title': 'A course',
'subtitle': None,
'favicon': None,
'picture': None,
'authors': [],
'chapter_preview_only': [],
'license': None,
'links': [{
'title': 'Manual',
'target': 'manual.html',
......@@ -33,7 +33,7 @@ def clean_tree(target):
def update_dict(current: dict, new: dict):
"""Update current multi-level dict with new dict"""
for k, v in new.items():
if k in current and type(v) is dict:
if k in current and type(current[k]) is dict and type(v) is dict:
# Update current entry by descending into sub dict
update_dict(current[k], v)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment