Skip to content

Commit

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

* fix

* remove space

* fix space issue

* fix space issue

---------

Co-authored-by: Yaqin Li <[email protected]>
  • Loading branch information
liyaqin1 and Yaqin Li authored Oct 21, 2024
1 parent 5f952dd commit 48221b4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions deploy-board/deploy_board/webapp/env_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,16 @@ def _gen_deploy_summary(request, deploys, for_env=None):
account = None
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)
account_key = (provider, cell, id)
if account_key in accounts:
account = accounts[account_key]
else:
account = accounts_helper.get_by_cell_and_id(request, cell, id, provider)
if account is None:
account = accounts_helper.get_default_account(request, cell, provider)
accounts[account_key] = account
if cluster:
provider, cell, id = cluster["provider"], cluster["cellName"], cluster.get("accountId", None)
account_key = (provider, cell, id)
if account_key in accounts:
account = accounts[account_key]
else:
account = accounts_helper.get_by_cell_and_id(request, cell, id, provider)
if account is None:
account = accounts_helper.get_default_account(request, cell, provider)
accounts[account_key] = account
deploy_accounts = []
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 48221b4

Please sign in to comment.