Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix SchemaEditor.__exit__ to handle exceptions correctly

  • Loading branch information...
commit 630eb0564abd228da439d86ad93acb4089d795e7 1 parent 9f6e600
@andrewgodwin andrewgodwin authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 django/db/backends/schema.py
View
5 django/db/backends/schema.py
@@ -74,10 +74,7 @@ def __exit__(self, exc_type, exc_value, traceback):
if exc_type is None:
for sql in self.deferred_sql:
self.execute(sql)
- atomic(self.connection.alias, self.connection.features.can_rollback_ddl).__exit__(None, None, None)
- else:
- # Continue propagating exception
- return None
+ atomic(self.connection.alias, self.connection.features.can_rollback_ddl).__exit__(exc_type, exc_value, traceback)
# Core utility functions
Please sign in to comment.
Something went wrong with that request. Please try again.