fix: remove debug try-except block
This commit is contained in:
@@ -2255,21 +2255,15 @@ async def get_node_by_id(node_id: str) -> Optional[dict]:
|
||||
data = dict(row)
|
||||
|
||||
# Fetch MicroDAOs where orchestrator is on this node
|
||||
try:
|
||||
microdaos = await pool.fetch("""
|
||||
SELECT m.id, m.slug, m.name, COUNT(cr.id) as rooms_count
|
||||
FROM microdaos m
|
||||
JOIN agents a ON m.orchestrator_agent_id = a.id
|
||||
LEFT JOIN city_rooms cr ON cr.microdao_id::text = m.id
|
||||
WHERE a.node_id = $1
|
||||
GROUP BY m.id, m.slug, m.name
|
||||
ORDER BY m.name
|
||||
""", node_id)
|
||||
except Exception as e:
|
||||
import logging
|
||||
logging.getLogger(__name__).error(f"DEBUG Error fetching microdaos: {e}")
|
||||
# If this fails, just return empty list to avoid breaking the whole page
|
||||
microdaos = []
|
||||
microdaos = await pool.fetch("""
|
||||
SELECT m.id, m.slug, m.name, COUNT(cr.id) as rooms_count
|
||||
FROM microdaos m
|
||||
JOIN agents a ON m.orchestrator_agent_id = a.id
|
||||
LEFT JOIN city_rooms cr ON cr.microdao_id::text = m.id
|
||||
WHERE a.node_id = $1
|
||||
GROUP BY m.id, m.slug, m.name
|
||||
ORDER BY m.name
|
||||
""", node_id)
|
||||
|
||||
data["microdaos"] = [dict(m) for m in microdaos]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user