mirror of
https://github.com/simonw/datasette.git
synced 2026-11-26 11:59:39 +01:00
Fix bug where -s could reset settings to defaults, closes #2389
This commit is contained in:
parent
f6bd2bf8b0
commit
bf953628bb
4 changed files with 70 additions and 1 deletions
|
|
@ -1451,3 +1451,12 @@ async def calculate_etag(filepath, chunk_size=4096):
|
|||
_etag_cache[filepath] = etag
|
||||
|
||||
return etag
|
||||
|
||||
|
||||
def deep_dict_update(dict1, dict2):
|
||||
for key, value in dict2.items():
|
||||
if isinstance(value, dict):
|
||||
dict1[key] = deep_dict_update(dict1.get(key, type(value)()), value)
|
||||
else:
|
||||
dict1[key] = value
|
||||
return dict1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue