Skip to content

Commit

Permalink
early return only on configured
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Nov 29, 2024
1 parent bb402b2 commit dbf8f02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fixbackend/cloud_accounts/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ async def create_azure_account(
raise ResourceNotFound("Organization does not exist")

if existing := await self.cloud_account_repository.get_by_account_id(workspace_id, account_id):
if not isinstance(existing.state, CloudAccountStates.Deleted):
if isinstance(existing.state, CloudAccountStates.Configured):
log.info("Azure account already exists")
return existing

Expand Down

0 comments on commit dbf8f02

Please sign in to comment.