Skip to content

Commit

Permalink
fix: fix wrong runner call while sharing an azureStorage dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
esasova committed Jul 30, 2024
1 parent a5f7245 commit 5ee7ffb
Showing 1 changed file with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,32 @@ export function* updateDatasetSecurity(action) {
datasetData: datasetUpdated,
});

const runnerId = dataset.source?.name;
try {
if (runnerId != null) {
yield call(
RunnerService.updateSecurity,
organizationId,
workspaceId,
runnerId,
oldDatasetSecurity,
newDatasetSecurity
if (dataset.sourceType === 'ETL') {
const runnerId = dataset.source?.name;
try {
if (runnerId != null) {
yield call(
RunnerService.updateSecurity,
organizationId,
workspaceId,
runnerId,
oldDatasetSecurity,
newDatasetSecurity
);
}
} catch (error) {
console.error(error);
yield put(
dispatchSetApplicationErrorMessage(
error,
t(
'commoncomponents.banner.runnerSecurityNotUpdated',
`Runner {{runnerId}} permissions have not been updated`,
{ runnerId }
)
)
);
}
} catch (error) {
console.error(error);
yield put(
dispatchSetApplicationErrorMessage(
error,
t(
'commoncomponents.banner.runnerSecurityNotUpdated',
`Runner {{runnerId}} permissions have not been updated`,
{ runnerId }
)
)
);
}
} catch (error) {
console.error(error);
Expand Down

0 comments on commit 5ee7ffb

Please sign in to comment.