Ticket #17624: django-bug-17624.patch
File django-bug-17624.patch, 1.5 KB (added by , 13 years ago) |
---|
-
django/db/transaction.py
204 204 self.entering(self.using) 205 205 206 206 def __exit__(self, exc_type, exc_value, traceback): 207 self.exiting(exc_value, self.using) 207 success = exc_type is None and exc_value is None and traceback is None 208 self.exiting(success, self.using) 208 209 209 210 def __call__(self, func): 210 211 @wraps(func) … … 254 255 enter_transaction_management(managed=False, using=using) 255 256 managed(False, using=using) 256 257 257 def exiting( exc_value, using):258 def exiting(success, using): 258 259 leave_transaction_management(using=using) 259 260 260 261 return _transaction_func(entering, exiting, using) … … 270 271 enter_transaction_management(using=using) 271 272 managed(True, using=using) 272 273 273 def exiting( exc_value, using):274 def exiting(success, using): 274 275 try: 275 if exc_value is not None:276 if not success: 276 277 if is_dirty(using=using): 277 278 rollback(using=using) 278 279 else: … … 298 299 enter_transaction_management(using=using) 299 300 managed(True, using=using) 300 301 301 def exiting( exc_value, using):302 def exiting(success, using): 302 303 leave_transaction_management(using=using) 303 304 304 305 return _transaction_func(entering, exiting, using)