Skip to content

Commit

Permalink
allow enabling degraded accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Sep 3, 2024
1 parent 924dac7 commit 779a69d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fixbackend/cloud_accounts/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ def update_state(cloud_account: CloudAccount) -> CloudAccount:
scan=scan,
)
return evolve(cloud_account, state=CloudAccountStates.Configured(access, enabled, scan))
case CloudAccountStates.Degraded():
return evolve(cloud_account, state=evolve(cloud_account.state, scan=scan))
case _: # pragma: no cover
raise WrongState(f"Account {cloud_account_id} is not configured, cannot enable account")

Expand Down

0 comments on commit 779a69d

Please sign in to comment.