Skip to content

Commit

Permalink
Transform null names to an empty string before submission (#3683)
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonking authored Jun 26, 2023
1 parent 3a4798f commit 50273e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit 50273e6

Please sign in to comment.