Skip to content

Bug ::: folder validators ::: Missing return from field_validator (-s) #91

@AlesCUMSI

Description

@AlesCUMSI

Hi!

I validators folder, there are bugs in severak validators.
They all follow the same principle:
@field_validator('treatments')
@classmethod
def check_treatments(cls, v: list) -> list:
for treatment in v:
Treatment(**treatment)

Field validator MUST return v (it is correct in some part of code, but not all). Because of this all this fields are set to null by pydantic (it is not an exception, they are just set to null).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions