wallneradam/esorm

str | None doesn't work

Closed this issue · 3 comments

Environment

Pydantic == 2.8.2
pyesorm == 0.4.7
from esorm import ESModel


class A(ESModel)
    name: str | None

It throws the following error.

ValueError: Unknown ES field type: str | None

If change str | None to Optional[str], it works.
But I still think it would be great to support Python new typing feature like str | None, list[int], dict[str, int] and so on.

It is also fixed in the new version, please check it.

@wallneradam
When will you release new version?

Aha, now I can see new version.
Thank you, I will check right now.