Skip to content

bug(core): strip_binary_variable_types_data performs insufficient type checks for values #751

@AlessandroPomponio

Description

@AlessandroPomponio

The
strip_binary_variable_types_data
field validator in DiscoverySpaceConfiguration has two issues:

  1. 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.

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions