fix: update_dict bug

This commit is contained in:
caoqianming 2023-08-04 18:24:17 +08:00
parent 2f42d8386e
commit d26a7d5805
1 changed files with 3 additions and 4 deletions

View File

@ -41,11 +41,10 @@ def update_dict(dict1, dict2):
if key == 'apk_file': # apk_file拷贝到固定位置
from shutil import copyfile
copyfile(BASE_DIR + value, BASE_DIR + '/media/zc_ehs.apk')
if key in dict1 and isinstance(dict1[key], dict) and isinstance(value, dict):
update_dict(dict1[key], value)
else:
if key in dict1 and isinstance(dict1[key], dict) and isinstance(value, dict):
update_dict(dict1[key], value)
else:
dict1[key] = value
dict1[key] = value
def update_sysconfig(new_dict):
config = get_sysconfig()