diff --git a/fixbackend/cloud_accounts/schemas.py b/fixbackend/cloud_accounts/schemas.py index 92b013c3..48279df1 100644 --- a/fixbackend/cloud_accounts/schemas.py +++ b/fixbackend/cloud_accounts/schemas.py @@ -95,6 +95,11 @@ def from_model(model: CloudAccount) -> "CloudAccountRead": scan = model.state.scan is_configured = True + case CloudAccountStates.Degraded(): + enabled = model.state.enabled + scan = model.state.scan + is_configured = False + last_scan_finished = None if model.last_scan_started_at: last_scan_finished = model.last_scan_started_at + timedelta(seconds=model.last_scan_duration_seconds)