@@ -110,18 +110,19 @@ def config():
110
110
111
111
if all_valid :
112
112
# Create backup before saving
113
- backup_path = _create_backup ()
113
+ _create_backup ()
114
114
115
115
try :
116
116
# Save all configuration sections
117
- for section , fields in new_config .items ():
118
- for field , value in fields .items ():
117
+ for section_name , fields in new_config .items ():
118
+ for field_name , value in fields .items ():
119
119
if isinstance (value , dict ):
120
- for sub_field , sub_value in value .items ():
120
+ for sub_field_name , sub_value in value .items ():
121
121
config_mgr .set (
122
- f'{ section } .{ field } .{ sub_field } ' , str (sub_value ))
122
+ f'{ section_name } .{ field_name } .{ sub_field_name } ' , str (sub_value ))
123
123
else :
124
- config_mgr .set (f'{ section } .{ field } ' , str (value ))
124
+ config_mgr .set (
125
+ f'{ section_name } .{ field_name } ' , str (value ))
125
126
126
127
return redirect (url_for ('config' , saved = '1' ))
127
128
except Exception as e :
@@ -200,10 +201,10 @@ def import_config():
200
201
201
202
# Check if all validations pass
202
203
all_valid = True
203
- for section , fields in validation_results .items ():
204
- for field , result in fields .items ():
204
+ for _section_name , fields in validation_results .items ():
205
+ for _field_name , result in fields .items ():
205
206
if isinstance (result , dict ):
206
- for sub_field , sub_result in result .items ():
207
+ for _sub_field_name , sub_result in result .items ():
207
208
if not sub_result ['valid' ]:
208
209
all_valid = False
209
210
break
0 commit comments