Skip to content

Commit

Permalink
fix: data_source_account reset error (cloudforet-io#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMin5 committed May 13, 2024
1 parent bcc98a9 commit cb6c605
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,15 @@ def reset(self, params: DataSourceAccountResetRequest) -> None:
domain_id = params.domain_id

# Check if the data source exists
data_source_vo = self.data_source_mgr.get_data_source(
data_source_id, domain_id, workspace_id
)
role_type = self.transaction.get_meta("authorization.role_type")
if role_type != "DOMAIN_ADMIN":
data_source_vo = self.data_source_mgr.get_data_source(
data_source_id, domain_id, workspace_id
)
else:
data_source_vo = self.data_source_mgr.get_data_source(
data_source_id, domain_id
)

conditions = {
"data_source_id": data_source_id,
Expand Down

0 comments on commit cb6c605

Please sign in to comment.