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:36:36 +03:00 committed by GitHub
parent b2864bab04
commit 080933eed1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
db.py
View file

@ -20,7 +20,11 @@ class Utils:
def set(main_dict: dict, path: str, *, key: str, value):
def magic(alt_dict: dict, key: str):
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:
alt_dict[key] = {}
return alt_dict