I want to store information about some people in a MySQL database. Due to the nature of the information, birth dates can be full dates (1940-05-02), month and year (1932-07) or years only (1965). I searched the pydantic documentation and it says to use Unions to accept multiple data types. However, when I try to do this sqlmodel raises the error TypeError: issubclass() arg 1 must be a class. I know the issue comes from union because if I remove it then the code works just fine.
Activity
nidico commented on Apr 24, 2022
Looks like a duplicate of #67, isn't it?