Skip to content

Commit

Permalink
Fix cloud account enabled bug
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Sep 2, 2024
1 parent 2d8311d commit 1ffa112
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fixbackend/cloud_accounts/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ffa112

Please sign in to comment.