fix minor

main
Cizz22 7 months ago
parent a391ed4de0
commit 87daf1527c

@ -21,6 +21,7 @@ async def get_all_simulation(db_session: DbSession, common: CommonParameters):
results = await get_all(common = common)
return {"data": results, "status": "success", "message": "Success"}

@ -23,27 +23,26 @@ async def get_all(*, common):
selectinload(AerosEquipment.aeros_equipment_details)
)
results = await search_filter_sort_paginate(model=query, **common)
reg_nodes = [node.node_name for node in results["items"]]
requestedNode = {
"projectName": "ParallelNode",
"equipmentName": [node.node_name for node in results["items"]],
}
updateNodeReq = {"projectName": "trialapi", "equipmentNames": reg_nodes}
try:
response = await client.post(
f"{AEROS_BASE_URL}/api/UpdateDisParams/GetUpdatedNodeDistributions",
json=requestedNode,
json=updateNodeReq,
headers={"Content-Type": "application/json"},
)
response.raise_for_status()
aerosEquipmentResult = response.json()
res = response.json()
except Exception as e:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
)
results["items"] = aerosEquipmentResult
results["items"] = res
return results
@ -131,6 +130,8 @@ async def save_default_equipment(*, db_session: DbSession, project_name: str):
results = response.json()
raise Exception(updateNodeReq)
nodes = []
# save to db

@ -53,17 +53,17 @@ async def import_aro_project(*, db_session: DbSession):
# Update path to AEROS APP
# Example BODy "C/dsad/dsad.aro"
try:
response = await client.post(
f"{AEROS_BASE_URL}/api/Project/ImportAROFile",
json=f"/",
headers={"Content-Type": "application/json"},
)
response.raise_for_status()
except Exception as e:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
)
# try:
# response = await client.post(
# f"{AEROS_BASE_URL}/api/Project/ImportAROFile",
# json=f"/",
# headers={"Content-Type": "application/json"},
# )
# response.raise_for_status()
# except Exception as e:
# raise HTTPException(
# status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
# )
await _initialize_default_project_data(
db_session=db_session,

Loading…
Cancel
Save