Fix consensus endpoint bug - use request_data.consensus_threshold
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Bug: achieve_consensus endpoint was trying to access request.consensus_threshold but the parameter is named request_data (type ConsensusRequest), causing AttributeError. Fix: Changed request.consensus_threshold to request_data.consensus_threshold in apps/coordinator-api/src/app/contexts/agent_coordination/routers/swarm.py Service restarted: aitbc-coordinator-api
This commit is contained in:
@@ -121,7 +121,7 @@ async def achieve_consensus(request: Request, task_id: str, request_data: Consen
|
||||
"""Achieve swarm consensus on task result."""
|
||||
return {
|
||||
"task_id": task_id,
|
||||
"consensus_threshold": request.consensus_threshold,
|
||||
"consensus_threshold": request_data.consensus_threshold,
|
||||
"consensus_reached": True,
|
||||
"status": "consensus_achieved"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user