diff --git a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx index e5925187a3..f471306391 100644 --- a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx +++ b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx @@ -236,7 +236,7 @@ export const ConnectorParametersForm = ({ ).map((action) => action.toString()); // @ts-ignore - initialValues.secrets = connectionConfig.secrets ?? {}; + initialValues.secrets = connectionConfig.secrets ? _.cloneDeep(connectionConfig.secrets) : {}; // check if we need we need to pre-process any secrets values // we currently only need to do this for Fides dataset references @@ -245,8 +245,10 @@ export const ConnectorParametersForm = ({ Object.entries(secretsSchema.properties).forEach(([key, schema]) => { if (schema.allOf?.[0].$ref === FIDES_DATASET_REFERENCE) { const datasetReference = initialValues.secrets[key]; - initialValues.secrets[key] = - `${datasetReference.dataset}.${datasetReference.field}`; + if (datasetReference) { + initialValues.secrets[key] = + `${datasetReference.dataset}.${datasetReference.field}`; + } } }); } diff --git a/clients/admin-ui/src/types/api/models/ConnectionConfigurationResponse.ts b/clients/admin-ui/src/types/api/models/ConnectionConfigurationResponse.ts index 581d6202cd..bc511df7fe 100644 --- a/clients/admin-ui/src/types/api/models/ConnectionConfigurationResponse.ts +++ b/clients/admin-ui/src/types/api/models/ConnectionConfigurationResponse.ts @@ -22,7 +22,7 @@ export type ConnectionConfigurationResponse = { last_test_timestamp?: string | null; last_test_succeeded?: boolean | null; saas_config?: SaaSConfigBase | null; - secrets?: null; + secrets?: any; authorized?: boolean | null; enabled_actions?: Array | null; };