Skip to content

Commit

Permalink
LA-56 Only trigger dataset save if values have changed (#5612)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucano Vera <[email protected]>
  • Loading branch information
lucanovera and Lucano Vera authored Dec 17, 2024
1 parent 937e713 commit 70272d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The types of changes are:

### Fixed
- Fixing quickstart.py script [#5585](https://github.com/ethyca/fides/pull/5585)
- Removed unnecessary double notification when updating database integrations [#5612](https://github.com/ethyca/fides/pull/5612)

## [2.51.2](https://github.com/ethyca/fides/compare/2.51.1...2.51.2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ export const useConnectorForm = ({
values.dataset &&
connectionOption.type === SystemType.DATABASE
) {
await patchConnectionDatasetConfig(values, connectionConfig.key);
await patchConnectionDatasetConfig(values, connectionConfig.key, {
showSuccessAlert: false,
});
}

successAlert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const useDatasetConfigField = ({
const patchConnectionDatasetConfig = async (
values: ConnectionConfigFormValues,
connectionConfigKey: string,
{ showSuccessAlert = true }: { showSuccessAlert?: boolean } = {},
) => {
const newDatasetPairs: DatasetConfigCtlDataset[] =
values.dataset?.map((datasetKey) => ({
Expand All @@ -65,7 +66,7 @@ export const useDatasetConfigField = ({
const payload = await putDatasetConfig(params).unwrap();
if (payload.failed?.length > 0) {
errorAlert(payload.failed[0].message);
} else {
} else if (showSuccessAlert) {
successAlert("Dataset successfully updated!");
}
};
Expand Down

0 comments on commit 70272d1

Please sign in to comment.