Python Django db transaction uses update
Resolved - I deleted the table records in the transaction block.
It was a bug in the code.
Thanks for helpful comments
I am using django transactions to work with my DB. The thing I am stuck on is that I have a DB and I want to replace the whole DB table with a new one created in the transaction block. The behavior of @transaction.atomic is that it will always update the DB table. So the old table entries will stay there. How to always remove the old entries? Am I missing something in the Django specs? Or do I need to clear the db table manually inside the transaction block?