Skip to content

Commit 271a6c4

Browse files
authored
Merge pull request #222 from ImMin5/feature-cost-router
Add check workspace when update data_source_account
2 parents a30c81d + ecd8c5c commit 271a6c4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/spaceone/cost_analysis/service/data_source_account_service.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ def update(
5454
workspace_id = params.workspace_id
5555

5656
# Check if the data source exists
57-
data_source_vo = self.data_source_mgr.get_data_source(
58-
data_source_id, domain_id, workspace_id
59-
)
57+
data_source_vo = self.data_source_mgr.get_data_source(data_source_id, domain_id)
58+
59+
# Check workspace
60+
if workspace_id:
61+
identity_mgr = self.locator.get_manager("IdentityManager")
62+
identity_mgr.check_workspace(workspace_id, domain_id)
6063

6164
data_source_account_vo = self.data_source_account_mgr.get_data_source_account(
6265
data_source_id, account_id, domain_id, workspace_id

0 commit comments

Comments
 (0)