Skip to content

Commit

Permalink
fix bug (#1733)
Browse files Browse the repository at this point in the history
* debug

* debug

* test

* test

* fix a bug

* fix a bug

---------

Co-authored-by: Yaqin Li <[email protected]>
  • Loading branch information
liyaqin1 and Yaqin Li authored Oct 19, 2024
1 parent 1bd2eb3 commit 5f952dd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions deploy-board/deploy_board/webapp/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ def get_accounts_from_deploy(request, env, deploy, build_with_tag):
deploy_accounts = []
if env and env.get("clusterName") is not None:
cluster = clusters_helper.get_cluster(request, env["clusterName"])
provider, cell, id = cluster["provider"], cluster["cellName"], cluster.get("accountId", None)
if not id:
account = accounts_helper.get_default_account(request, cell, provider=provider)
else:
account = accounts_helper.get_by_cell_and_id(request, cell, id, provider)
if cluster:
provider, cell, id = cluster["provider"], cluster["cellName"], cluster.get("accountId", None)
if not id:
account = accounts_helper.get_default_account(request, cell, provider=provider)
else:
account = accounts_helper.get_by_cell_and_id(request, cell, id, provider)

if account is None and env and deploy and build_with_tag:
# terraform deploy, get information from deploy report
Expand Down

0 comments on commit 5f952dd

Please sign in to comment.