Opened 7 years ago

Closed 7 years ago

#4422 closed (fixed)

django tries to rollback transactions on exceptions when using the dummy engine

Reported by: Ben Dean-Kawamura <ben.dean.kawamura@…> Owned by: adrian
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I'm using django, but don't want to use the database part of it. However, this causes a problem whenever I have an unhandled exception. At the bottom of django/db/, django connects _rollback_on_exception() to the got_request_exception signal. This means that on every request exception, transaction.rollback_unless_managed() is called which fails. Note: I'm not importing the db module, but other django modules seem to do it.

I think the solution is to not hook up the callback if the dummy engine is in use.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Component changed from Uncategorized to Database wrapper
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to adrian
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

This will have been fixed by [5410].

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.