Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1474 (closed enhancement: invalid)

Opened 11 years ago

Last modified 11 years ago

[PATCH] database.py to allow for rollback within controller

Reported by: guest Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 1.0.3
Severity: normal Keywords:
Cc:

Description

If a transaction is rolled back within a controller like this:

trans = session.create_transaction() trans.rollback()

TG will try to commit that transaction at the end of the request and will throw an InvalidRequestError?. This patch catches that error, allowing the controller to rollback the transaction.

Attachments

database.py.diff.1 Download (726 bytes) - added by guest 11 years ago.
patch allows for transaction rollback from within a controller

Change History

Changed 11 years ago by guest

patch allows for transaction rollback from within a controller

comment:1 Changed 11 years ago by guest

  • Status changed from new to closed
  • Resolution set to invalid
  • Summary changed from [PATCH] database.py to allow for rollback withink controller to [PATCH] database.py to allow for rollback within controller

Scratch this, the latest version of TG already does this.

Note: See TracTickets for help on using tickets.