Skip to content

Commit

Permalink
Merge pull request #222 from ImMin5/feature-cost-router
Browse files Browse the repository at this point in the history
Add check workspace when update data_source_account
  • Loading branch information
ImMin5 authored May 13, 2024
2 parents a30c81d + ecd8c5c commit 271a6c4
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 271a6c4

Please sign in to comment.