From c9ab83dcab15bd9a696f10c2fa5e8fa5bdc4371e Mon Sep 17 00:00:00 2001 From: Adam Sachs Date: Tue, 2 May 2023 18:48:15 -0400 Subject: [PATCH] prevent duplicate privacy declaration custom field column headers (#3202) --- src/fides/core/export.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fides/core/export.py b/src/fides/core/export.py index 618f1dd0a9..1d7b363625 100644 --- a/src/fides/core/export.py +++ b/src/fides/core/export.py @@ -150,10 +150,11 @@ def get_custom_field_headers( for key in custom_keys: key_string = f"system.{header_type}.{key}" - custom_columns[key_string] = key - keys.append(key_string) - output_list[0] = tuple(keys) - custom_field_headers.append(key_string) + if key_string not in keys: # if we havent't seen the key yet + custom_columns[key_string] = key + keys.append(key_string) + output_list[0] = tuple(keys) + custom_field_headers.append(key_string) return output_list, custom_columns, custom_field_headers