Closed airtonix closed 12 years ago
This error still occurs if using psycopg2, because the transaction is never rolled back, and any subsequent attempt to use the database fails. It appears to be possible to work around this by catching the DatabaseError and rolling back the transaction as necessary. E.g.:
def set_themes(): try: if not Site.objects.filter(id=settings.SITE_ID): return except DatabaseError: connection.rollback(); return;
https://github.com/MegaMark16/django-cms-themes/issues/1