Add selectinload(Campaign.agency) to get_with_proof_counts query so the agency relationship is eagerly loaded. Without it, accessing campaign.agency.name in the route triggered a lazy load in an async context, raising sqlalchemy.exc.MissingGreenlet and returning HTTP 500. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agents | ||
| api | ||
| dependencies | ||
| models | ||
| repositories | ||
| services | ||
| websocket | ||
| __init__.py | ||
| config.py | ||
| main.py | ||