You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The function validate_expected_files_by_modality fails because validated models generated from dictionaries don't recover Modality objects but instead recover a list of dictionaries.
To Reproduce
Steps to reproduce the behavior:
Load any valid metadata as a dict
Run Metadata.model_validate(dict)
abbreviation = modality.abbreviation.replace("-", "_").upper()
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'abbreviation'
Expected behavior
The function shouldn't crash on modality.abbreviation but should check if modality is a dict and use modality["abbreviation"] instead.
The text was updated successfully, but these errors were encountered:
Describe the bug
The function
validate_expected_files_by_modality
fails because validated models generated from dictionaries don't recover Modality objects but instead recover a list of dictionaries.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The function shouldn't crash on
modality.abbreviation
but should check if modality is adict
and usemodality["abbreviation"]
instead.The text was updated successfully, but these errors were encountered: