Ticket #1209 (closed defect: fixed)
Data already flushed does not rollback if exception occurs
|Reported by:||sanjay||Owned by:||splee|
If we use multiple flushes (SQLAlchemy) sequentially in a controller method, and some exception occurs in between, all the flushed data should ideally rollback. It's because the controller method is automatically encapsulated in a transaction by TurboGears.
But it is not happening in the sample project attached.
Description about the attached sample project:
Models: Website, Page
- An website can consist of multiple pages.
- An website has a home page.
- Whenever a website is created, a homepage is created as well.
Url for creating an website (problem is shown here): http://localhost:8080/tran
- Priority changed from normal to high
- Status changed from new to assigned
- Owner changed from anonymous to alberto
- Status changed from assigned to new
- Owner changed from alberto to splee