django-debug-toolbar/django-debug-toolbar — pull request #331 by intgr (2012-10-22 14:09:10+00:00)
Title: psycopg2: Avoid causing a 2nd error in an aborted transaction

Asking for connection isolation_level results in a query executed by
psycopg2. However, all queries ran in an aborted transaction will result
in a new error.

This is my biggest annoyance with the debug toolbar -- whenever a query
causes an aborted transaction, the original error is hidden and a new
exception is thrown:

InternalError: current transaction is aborted, commands ignored until
end of transaction block