mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
redux
This commit is contained in:
parent
d5bfff6220
commit
fb2df01787
1 changed files with 3 additions and 8 deletions
7
db.py
7
db.py
|
@ -19,13 +19,8 @@ class Utils:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
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() and isinstance(alt_dict[key], dict):
|
||||||
if isinstance(alt_dict[key], dict):
|
|
||||||
return alt_dict
|
return alt_dict
|
||||||
else:
|
|
||||||
alt_dict[key] = {}
|
|
||||||
return alt_dict
|
|
||||||
else:
|
|
||||||
alt_dict[key] = {}
|
alt_dict[key] = {}
|
||||||
return alt_dict
|
return alt_dict
|
||||||
main_dict_ref, i = main_dict, 0
|
main_dict_ref, i = main_dict, 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue