deving
This commit is contained in:
+12
-2
@@ -156,8 +156,18 @@ async def get_status(task_id: str, db_session: AsyncSession = Depends(get_db_ses
|
||||
|
||||
geometry_json: Optional[Dict[str, Any]] = None
|
||||
if file_with_data.get("geometry_data"):
|
||||
# save_geometry_data 支持两种格式,这里直接拿回来的就是几何字典
|
||||
geometry_json = file_with_data["geometry_data"]
|
||||
# save_geometry_data 保存时可能有两种格式:
|
||||
# 1. 直接保存 geometry_data 字典
|
||||
# 2. 保存 {"geometry_data": {...}} 格式
|
||||
# get_stp_file_with_data 返回的是从RustFS下载的原始JSON
|
||||
geo_raw = file_with_data["geometry_data"]
|
||||
if isinstance(geo_raw, dict):
|
||||
# 如果是包装格式,提取内部数据
|
||||
if "geometry_data" in geo_raw:
|
||||
geometry_json = geo_raw["geometry_data"]
|
||||
else:
|
||||
# 直接就是几何数据字典
|
||||
geometry_json = geo_raw
|
||||
|
||||
cavity_json: Optional[Dict[str, Any]] = file_with_data.get("mold_cavity_data")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user