[Answered ]-Error with django model query

2👍

Django stats a database transaction for your view. So when you catch the exception, it means the transaction is in a failed state and you can’t run any more SQls. You should really try to figure what the actual problem is when it fails either in your post.save or blogContent.save methods. If you really don’t care (since you just catch the exception and continue), you should manage transactions yourself. See the docs for help on this:

👤ars

Leave a comment