1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2025-07-27 11:47:45 +00:00
This commit is contained in:
RGBCube 2022-01-21 15:44:54 +03:00 committed by GitHub
parent d5bfff6220
commit fb2df01787
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
db.py
View file

@ -19,13 +19,8 @@ class Utils:
@staticmethod
def set(main_dict: dict, path: str, *, key: str, value):
def magic(alt_dict: dict, key: str):
if key in alt_dict.keys():
if isinstance(alt_dict[key], dict):
if key in alt_dict.keys() and isinstance(alt_dict[key], dict):
return alt_dict
else:
alt_dict[key] = {}
return alt_dict
else:
alt_dict[key] = {}
return alt_dict
main_dict_ref, i = main_dict, 0