Automatically create relations based on Pydantic Model Input #1267
Unanswered
twitch0001
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am working on a User system using Pydantic and Tortoise. During the registration process, users are able to include pronouns to add to their profile, I was wondering whether there is a way to automatically create relations based on the
UserIn
pydantic model made usingpydantic_model_creator
. I have added the two models and the lines of code used to create the Pydantic models.Would it be possible to have tortoise automatically insert the pronouns relation if provided to the UserIn model?
Many thanks,
twitch :)
Beta Was this translation helpful? Give feedback.
All reactions