Open miss85246 opened 1 year ago
I am curious. Where is StrDatetimeField
coming from here?
I am curious. Where is
StrDatetimeField
coming from here?
just a custom field, I do some custom serialize base on datetime field 🥹
I am curious. Where is
StrDatetimeField
coming from here?just a custom field, I do some custom serialize base on datetime field 🥹
Oooh. Wait do you think a custom field like that will fix this issue? #1482
Describe the bug I'm write a BaseModel and rewrite the create method, because I want auto create audit record after I create a new record. but I found I can't get instance's pk after I create it. It's will be null ever for my audit record id field. even stranger is I can print instance's id before I create audit instance. why and what should I do ?
To Reproduce This is a simple case:
this is auditModel generate file:
at last, this is my business logic Model :
Expected behavior In my mind, after I await super create instance, I should got this pk, and pass it to my audit model.
Additional context python version: 3.11.4 system os : MacOS tortoise-orm version: 0.20.0 database: mysql 8.0
I really need help, look forward your response, thanks!