save code
This commit is contained in:
+10
-5
@@ -732,8 +732,9 @@ def do_change_cloth():
|
||||
|
||||
output_format = data.get('output_format')
|
||||
|
||||
if data['suit']:
|
||||
return process_change_banana(human_filename, cloth_filename, output_format)
|
||||
if 'suit' in data:
|
||||
if data['suit']:
|
||||
return process_change_banana(human_filename, cloth_filename, output_format)
|
||||
|
||||
def check_type(var):
|
||||
if isinstance(var, bool):
|
||||
@@ -743,10 +744,14 @@ def do_change_cloth():
|
||||
else:
|
||||
print(f"既不是字符串也不是布尔值no2,实际类型: {type(var)}")
|
||||
|
||||
no2 = data['no2']
|
||||
check_type(no2)
|
||||
no2 = False
|
||||
if 'no2' in data:
|
||||
no2 = data['no2']
|
||||
check_type(no2)
|
||||
|
||||
tuodi = data['tuodi']
|
||||
tuodi = False
|
||||
if 'tuodi' in data:
|
||||
tuodi = data['tuodi']
|
||||
print(f"tuodi:{tuodi}")
|
||||
|
||||
kuzi_url = None
|
||||
|
||||
Reference in New Issue
Block a user