xact icon indicating copy to clipboard operation
xact copied to clipboard

Simple thread safety fix + a more reliable way to check if managed

Open kylemacfarlane opened this issue 12 years ago • 0 comments

This includes two fixes.

  1. The current SID is now thread local.

  2. More sensible behaviour if for some reason autocommit is off but this decorator is in use.

When I use this decorator I also remove the custom _leave_transaction_management. Django itself sometimes starts transactions within the ORM and this fix does not cover those occasions. Placing a fix in this decorator gives people false hope when they really need to just patch Django proper.

kylemacfarlane avatar May 17 '12 12:05 kylemacfarlane