Skip to content

Commit

Permalink
Transform null names to an empty string before submission
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonking committed Jun 26, 2023
1 parent 3a4798f commit 871f18d
Showing 1 changed file with 7 additions and 1 deletion.
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 871f18d

Please sign in to comment.