Stop random "Parent instance not associated with session"

I know that there were answers to various questions, but the fact is that:

I have some unit tests and they sometimes work fine, but sometimes I get "The parent instance is not associated with the session"

So, how would I start debugging something like this if this happens by accident.

Oh, and there was a challenge before the error db.session.add(my_item).

+4
source share
1 answer

? , , Python (pdb) , . , , Python, , .

Python DEBUG .

+1

Source: https://habr.com/ru/post/1584675/


All Articles