Kaydet (Commit) 630eb056 authored tarafından Andrew Godwin's avatar Andrew Godwin

Fix SchemaEditor.__exit__ to handle exceptions correctly

üst 9f6e6009
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment