Changes between Initial Version and Version 2 of Ticket #15383
- Timestamp:
- Feb 22, 2011, 7:44:23 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15383
- Property Resolution → invalid
- Property Status new → closed
-
Ticket #15383 – Description
initial v2 5 5 6 6 Example 7 7 {{{ 8 8 @transaction.commit_manually 9 9 def example(request): 10 10 transaction.rollback() 11 11 another_func() 12 12 }}} 13 13 If the proc returns an HttpResponse or a redirect or whatever after the rollback this works fine. Trying to debug the django code I've realized that the transaction rollbacks fine and the connection is set to _dirty=False. But as soon as another function is called the connection is flagged to dirty again. Now even if the function called does not have the decorator the connection will be set to dirty. 14 14 15 15 Not sure at all if the expected behavior is to set the connection to dirty but it looks to me like it's causing this issue since the following code checks that variable and just throws an error: 16 16 {{{ 17 17 def leave_transaction_management(self): 18 18 """ … … 32 32 "pending COMMIT/ROLLBACK") 33 33 self._dirty = False 34 34 }}} 35 35 This is on the trunk version 1.3 beta 1 SVN-15632 36 36 37 37 This is my stack trace: 38 38 {{{ 39 39 Unexpected error in request /register/ : Traceback (most recent call last): 40 40 File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py", line 111, in get_response … … 51 51 raise TransactionManagementError("Transaction managed block ended with " 52 52 TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK 53 }}}