From 91b8e1b409d42164845d73d1f81410ced925ab3f Mon Sep 17 00:00:00 2001 From: Sean Preston Date: Mon, 6 Feb 2023 11:45:40 -0500 Subject: [PATCH] Migration Fix: Dataset.meta key not guaranteed to exist (#2510) --- .../versions/216cdc7944f1_add_datasetconfig_ctl_datasets_fk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fides/api/ctl/migrations/versions/216cdc7944f1_add_datasetconfig_ctl_datasets_fk.py b/src/fides/api/ctl/migrations/versions/216cdc7944f1_add_datasetconfig_ctl_datasets_fk.py index cd82137e87..2ca049cfc7 100644 --- a/src/fides/api/ctl/migrations/versions/216cdc7944f1_add_datasetconfig_ctl_datasets_fk.py +++ b/src/fides/api/ctl/migrations/versions/216cdc7944f1_add_datasetconfig_ctl_datasets_fk.py @@ -66,7 +66,7 @@ def upgrade(): new_ctl_dataset_id: str = "ctl_" + str(uuid.uuid4()) # Stashing extra text into the "meta" column so we can use this to downgrade if needed - appended_meta: Dict = dataset["meta"] or {} + appended_meta: Dict = dataset.get("meta", {}) appended_meta["fides_source"] = AUTO_MIGRATED_STRING validated_dataset: Dict = Dataset(