Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashing integrations after pydantic update #5227

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
Loading