You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then we just `add` it to the **session**, `commit`, and `refresh` it, and finally, we return the same `db_hero` variable that has the just refreshed `Hero` instance.
175
175
176
176
Because it is just refreshed, it has the `id` field set with a new ID taken from the database.
177
177
178
178
And now that we return it, FastAPI will validate the data with the `response_model`, which is a `HeroPublic`:
0 commit comments