The
strip_binary_variable_types_data
field validator in DiscoverySpaceConfiguration has two issues:
-
Missing None check before list iteration: The validator attempts to
iterate over values without first checking if it was None, which would
cause an error when entitySpace was not provided.
-
Premature TypeAdapter instantiation: The validator instantiated
TypeAdapter(list[ConstitutiveProperty]) when it detected a list, but only
checked isinstance(values, list) without verifying the list contents were
actually ConstitutiveProperty instances. This caused serialization errors
when the list contained dictionaries instead.
The
strip_binary_variable_types_datafield validator in
DiscoverySpaceConfigurationhas two issues:Missing None check before list iteration: The validator attempts to
iterate over
valueswithout first checking if it wasNone, which wouldcause an error when
entitySpacewas not provided.Premature TypeAdapter instantiation: The validator instantiated
TypeAdapter(list[ConstitutiveProperty])when it detected a list, but onlychecked
isinstance(values, list)without verifying the list contents wereactually
ConstitutivePropertyinstances. This caused serialization errorswhen the list contained dictionaries instead.