Skip to content

Commit 805707b

Browse files
authored
Merge pull request #119 from lhhyung/master
Prevent error when multiple secrets exist with collect_scope=subscription_id
2 parents 1b4a68f + 03cc020 commit 805707b

File tree

1 file changed

+1
-3
lines changed
  • src/cloudforet/cost_analysis

1 file changed

+1
-3
lines changed

src/cloudforet/cost_analysis/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,8 @@ def __get_secret_data(secret_data: dict, task_options: dict) -> dict:
202202
if len(secrets) == 1:
203203
return secrets[0]
204204

205-
billing_tenant_id = task_options["billing_tenant_id"]
206-
207205
for _secret_data in secrets:
208-
if _secret_data["tenant_id"] == billing_tenant_id:
206+
if _secret_data["tenant_id"] == task_options.get("billing_tenant_id"):
209207
return _secret_data
210208

211209
elif _secret_data.get("subscription_id") and _secret_data.get(

0 commit comments

Comments
 (0)