Skip to content

Не выполняется валидация моделей #518

@grodrock

Description

@grodrock

model = self.__class__.model_construct(_fields_set=_fields_set, **kwargs)

Метод model_construct отключает валидацию моделей: https://docs.pydantic.dev/2.4/concepts/models/#creating-models-without-validation
Cловил баг когда создавал чат с типом ChatTypes.PERSONAL_CHAT: он просто не конвертировался в 'chat'

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