Skip to content

Commit

Permalink
fix: return obj unchanged if schema ver of instance if the target
Browse files Browse the repository at this point in the history
The modified expression of
`schema_version == DANDI_SCHEMA_VERSION` is a
bug. Additionally, do comparison of versions
in tuples to a void missing cases of relation
between instance and target versions
  • Loading branch information
candleindark committed Feb 2, 2025
1 parent 3e6ad0b commit aeff664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dandischema/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def migrate(
schema = _get_schema(schema_version, "dandiset.json")
_validate_obj_json(obj, schema)

if schema_version == DANDI_SCHEMA_VERSION:
if instance_ver == target_ver:
return obj

if version2tuple(schema_version) < version2tuple("0.6.0"):
Expand Down

0 comments on commit aeff664

Please sign in to comment.