Skip to content

Commit

Permalink
Fix crashing integrations after pydantic update (#5227)
Browse files Browse the repository at this point in the history
  • Loading branch information
erosselli authored and adamsachs committed Aug 22, 2024
1 parent f52322b commit 1e9b4a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}`;
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActionType> | null;
};

0 comments on commit 1e9b4a6

Please sign in to comment.