diff --git a/src/spaceone/cost_analysis/service/data_source_account_service.py b/src/spaceone/cost_analysis/service/data_source_account_service.py index 8016752f..89044163 100644 --- a/src/spaceone/cost_analysis/service/data_source_account_service.py +++ b/src/spaceone/cost_analysis/service/data_source_account_service.py @@ -54,9 +54,12 @@ def update( workspace_id = params.workspace_id # Check if the data source exists - data_source_vo = self.data_source_mgr.get_data_source( - data_source_id, domain_id, workspace_id - ) + data_source_vo = self.data_source_mgr.get_data_source(data_source_id, domain_id) + + # Check workspace + if workspace_id: + identity_mgr = self.locator.get_manager("IdentityManager") + identity_mgr.check_workspace(workspace_id, domain_id) data_source_account_vo = self.data_source_account_mgr.get_data_source_account( data_source_id, account_id, domain_id, workspace_id