mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
fix
This commit is contained in:
parent
b2864bab04
commit
080933eed1
1 changed files with 5 additions and 1 deletions
6
db.py
6
db.py
|
@ -20,7 +20,11 @@ class Utils:
|
||||||
def set(main_dict: dict, path: str, *, key: str, value):
|
def set(main_dict: dict, path: str, *, key: str, value):
|
||||||
def magic(alt_dict: dict, key: str):
|
def magic(alt_dict: dict, key: str):
|
||||||
if key in alt_dict.keys():
|
if key in alt_dict.keys():
|
||||||
return alt_dict
|
if isinstance(alt_dict[key], dict):
|
||||||
|
return alt_dict
|
||||||
|
else:
|
||||||
|
alt_dict[key] = {}
|
||||||
|
return alt_dict
|
||||||
else:
|
else:
|
||||||
alt_dict[key] = {}
|
alt_dict[key] = {}
|
||||||
return alt_dict
|
return alt_dict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue