Skip to content

Commit

Permalink
fix: fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Aug 1, 2024
1 parent 51ff0e9 commit 8b87db4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cloudforet/cost_analysis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def cost_get_data(params: dict) -> Generator[dict, None, None]:

params["schema"] = params.pop("schema_name", None)
params["secret_data"] = __get_secret_data_with_tenant_id(
secret_data, task_options.get("tenant_id")
secret_data, task_options.get("billing_tenant_id")
)

if options.get("cost_metric") == "AmortizedCost" and task_options.get(
Expand Down Expand Up @@ -187,7 +187,7 @@ def __get_secret_data_with_tenant_id(secret_data: dict, tenant_id: str = None) -
return secrets[0]

for _secret_data in secrets:
if _secret_data["billing_tenant_id"] == tenant_id:
if _secret_data["tenant_id"] == tenant_id:
secret_data = _secret_data

return secret_data
3 changes: 3 additions & 0 deletions src/cloudforet/cost_analysis/manager/cost_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ def _get_additional_info(self, result: dict, options: dict, tenant_id: str = Non
):
result["metercategory"] = result.get("metercategory")

if result.get("meterid") != "" and result.get("meterid"):
additional_info["Meter Id"] = result["meterid"]

if result.get("customername") is None:
if result.get("invoicesectionname") != "" and result.get(
"invoicesectionname"
Expand Down

0 comments on commit 8b87db4

Please sign in to comment.