Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform null names to an empty string before submission #3683

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The types of changes are:
- Fix bug where linking an integration would not update the tab when creating a new system [#3662](https://github.com/ethyca/fides/pull/3662)
- Fix dataset yaml not properly reflecting the dataset in the dropdown of system integrations tab [#3666](https://github.com/ethyca/fides/pull/3666)
- Fix privacy notices not being able to be edited via the UI after the addition of the `cookies` field [#3670](https://github.com/ethyca/fides/pull/3670)
- Add a transform in the case of `null` name fields in privacy declarations for the data use forms [#3683](https://github.com/ethyca/fides/pull/3683)

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ const PrivacyDeclarationManager = ({
updatedDeclarations: PrivacyDeclarationResponse[],
isDelete?: boolean
) => {
// The API can return a null name, but cannot receive a null name,
// so do an additional transform here (fides#3862)
const transformedDeclarations = updatedDeclarations.map((d) => ({
...d,
name: d.name ?? "",
}));
const systemBodyWithDeclaration = {
...system,
privacy_declarations: updatedDeclarations,
privacy_declarations: transformedDeclarations,
};
const handleResult = (
result:
Expand Down