From 799f2149770c46a6a9b238deb802571237b53da4 Mon Sep 17 00:00:00 2001 From: beckermr Date: Thu, 19 Sep 2024 10:51:39 -0500 Subject: [PATCH] fix: use get_keys_default --- conda_forge_tick/migrators/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conda_forge_tick/migrators/core.py b/conda_forge_tick/migrators/core.py index ba91263d7..c0bfa47c9 100644 --- a/conda_forge_tick/migrators/core.py +++ b/conda_forge_tick/migrators/core.py @@ -34,7 +34,13 @@ def _skip_due_to_schema( attrs: "AttrsTypedDict", allowed_schema_versions: List[int] ) -> bool: __name = attrs.get("name", "") - if attrs["meta_yaml"].get("schema_version", 0) not in allowed_schema_versions: + schema_version = get_keys_default( + attrs, + ["meta_yaml", "schema_version"], + {}, + 0, + ) + if schema_version not in allowed_schema_versions: logger.debug( "%s: schema version not allowed - %r not in %r", __name,