summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-09-06 11:09:16 -0500
committerAndrew Godwin <andrew@aeracode.org>2013-09-06 11:09:16 -0500
commit630eb0564abd228da439d86ad93acb4089d795e7 (patch)
treed32c5d428467d308193d334be27eddcb9df14c9c
parent9f6e6009a44f26b9acfe3aadf76da7c29627a00b (diff)
Fix SchemaEditor.__exit__ to handle exceptions correctly
-rw-r--r--django/db/backends/schema.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/backends/schema.py b/django/db/backends/schema.py
index eac7364b11..3b1db33fe1 100644
--- a/django/db/backends/schema.py
+++ b/django/db/backends/schema.py
@@ -74,10 +74,7 @@ class BaseDatabaseSchemaEditor(object):
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