Skip to content

Validate on assignment #54

@azmeuk

Description

@azmeuk

It could make sense to enable the validate_assignment pydantic option, but in the current state this breaks the codebase.

The cause of this is that the Resource type parameter used for extensions is also implied for extensions, leading for instance to EnterpriseUser to be expected to be an extension of itself.

E           pydantic_core._pydantic_core.ValidationError: 1 validation error for User[EnterpriseUser]
E           EnterpriseUser
E             Input should be a valid dictionary or instance of EnterpriseUser[EnterpriseUser] [type=model_type, input_value=EnterpriseUser(schemas=['...play_name='John Smith')), input_type=EnterpriseUser]
E               For further information visit https://errors.pydantic.dev/2.8/v/model_type

May depend on a resolution on pydantic side: pydantic/pydantic#9858

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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