-
Notifications
You must be signed in to change notification settings - Fork 615
[BUG][EXPORT]: Selective export fails with 'Server' object has no attribute 'is_active' #2606
Copy link
Copy link
Closed
Closed
Copy link
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releasebugSomething isn't workingSomething isn't workingfixedIssue has been resolvedIssue has been resolvedpythonPython / backend development (FastAPI)Python / backend development (FastAPI)
Milestone
Description
Bug Summary
The /export/selective endpoint fails with 500 error when exporting servers.
Error: 'Server' object has no attribute 'is_active'
Affected Component
mcpgateway.services.export_service-export_selective()method
Steps to Reproduce
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"servers": ["<server_id>"]}' http://localhost:8080/export/selectiveExpected Behavior
Returns JSON export of selected servers.
Actual Behavior
Returns 500 with: 'Server' object has no attribute 'is_active'
Logs
2026-01-31T13:17:52 - mcpgateway - ERROR - Unexpected selective export error: 'Server' object has no attribute 'is_active'
Root Cause
The Server model likely uses enabled or active, but export service references is_active.
Investigation Points
- Check
mcpgateway/db.pyfor Server model - Check
mcpgateway/services/export_service.pyforexport_selective()
Workaround
Use GET /export for full export, or exclude servers from selective requests.
Discovered During
Locust load testing with ExportImportUser class.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releasebugSomething isn't workingSomething isn't workingfixedIssue has been resolvedIssue has been resolvedpythonPython / backend development (FastAPI)Python / backend development (FastAPI)