Skip to content

Commit

Permalink
#2350: improve logic in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Sep 23, 2024
1 parent cfa6b06 commit 8e4477c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/LBDatafile_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def validate_ids(field):
if 'seq_id' not in field and 'id' not in field:
raise ValueError('Either id (bit-encoded) or seq_id must be provided.')

if field['migratable'] and 'seq_id' in field and 'collection_id' not in field:
if field.get("migratable") is True and 'seq_id' in field and 'collection_id' not in field:
raise ValueError('If an entity is migratable, it must have a collection_id')

return field
Expand Down

0 comments on commit 8e4477c

Please sign in to comment.