fix: service configuration information reset when "Update from OpenAPI"

This commit is contained in:
Liujian committed 2025-12-18 15:43:18 +08:00
1 parent 2309de4025
commit 8abc7469cd
1 file changed
-8
@@ -480,14 +480,6 @@ class McpManagerService:
"name": temp_service.name,
"short_description": temp_service.short_description,
"long_description": temp_service.long_description,
"base_url": temp_service.base_url,
"headers": json.loads(temp_service.headers) if temp_service.headers else [],
"charge_type": temp_service.charge_type.value if temp_service.charge_type else None,
"price": str(float(temp_service.price)) if temp_service.price and temp_service.charge_type == ChargeType.PER_CALL else "0.00",
"input_token_price": str(float(temp_service.input_token_price)) if temp_service.input_token_price and temp_service.charge_type.value == ChargeType.PER_TOKEN else "0.00",
"output_token_price": str(float(temp_service.output_token_price)) if temp_service.output_token_price and temp_service.charge_type == ChargeType.PER_TOKEN else "0.00",
"enabled": temp_service.enabled,
"tags": parse_tags_to_array(temp_service.tags),
"apis": apis_list,
}
return result