tortoise-orm
tortoise-orm copied to clipboard
Base class fields of Model are None
Describe the bug
I've created models like in this tutorial https://tortoise-orm.readthedocs.io/en/latest/models.html#inheritance and trying retrieve object of child class (from example it's UserModel) but fields 'created_at' and 'modified_at' from TimestampMixin are None. But I can see in database fields are filled, so the problem is in retrieving fields for base Model.
To Reproduce https://tortoise-orm.readthedocs.io/en/latest/models.html#inheritance
Expected behavior I want to isolate some repetitive fields in separate Class not inherited from models.Model and be able to get them.
Additional context Python - 3.10.0 Tortoise ORM - 0.19.1
This issue took me all day to figure out. My program was working and then it didn't. Pinning version 0.19.0 fixes things for me.
Pinning version 0.19.0 fixes things for me.
+
0.19.1 and 0.19.2 are broken in fields abstract inheritance