Skip to content

Commit

Permalink
fix: use get_keys_default
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Sep 19, 2024
1 parent 5b7cbfd commit 799f214
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion conda_forge_tick/migrators/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 799f214

Please sign in to comment.