recently, it often appears when using sqlalchemy+python+gunicorn to develop a small project. Sqlalchemy reads the data and returns None, but it is possible to view the data in the database. As a novice, I suspect that there is something wrong with my writing with sqlalchemy code. I hope you can take a look at it for me.
is my code for inserting data:
:
with chance, sometimes the user has just registered successfully, and I see that there is data in the table, but the next second when I query the user table (through the custom search method), what is returned is None,. Is there a problem with what I wrote? no one around me contacted python, so I came here to consult you!