From 86ed5d7b50ef1fcf3d5d100be311d028560ab5ea Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Fri, 3 May 2024 13:28:54 +0900 Subject: [PATCH] feat: modify linked_account condition Signed-off-by: ImMin5 --- .../cost_analysis/manager/job_manager.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cloudforet/cost_analysis/manager/job_manager.py b/src/cloudforet/cost_analysis/manager/job_manager.py index d3981b9..e6369f9 100644 --- a/src/cloudforet/cost_analysis/manager/job_manager.py +++ b/src/cloudforet/cost_analysis/manager/job_manager.py @@ -73,9 +73,10 @@ def get_tasks( } } ) - synced_accounts = self._extend_synced_accounts( - synced_accounts, divided_customer_tenant_info - ) + if linked_accounts: + synced_accounts = self._extend_synced_accounts( + synced_accounts, divided_customer_tenant_info + ) changed.append({"start": start_month}) if first_sync_tenants: first_sync_start_month = self._get_start_month(start=None) @@ -97,9 +98,10 @@ def get_tasks( "filter": {"additional_info.Tenant Id": tenant_id}, } ) - synced_accounts = self._extend_synced_accounts( - synced_accounts, first_sync_tenants - ) + if linked_accounts: + synced_accounts = self._extend_synced_accounts( + synced_accounts, first_sync_tenants + ) else: tasks = [ {