Ticket #10450: savepoint_first.diff

File savepoint_first.diff, 1.0 KB (added by jdunck, 6 years ago)

Patch, no test.

  • django/db/backends/__init__.py

    diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
    index 5a3cb53..c680a75 100644
    a b class BaseDatabaseWrapper(local): 
    4040    def _savepoint(self, sid):
    4141        if not self.features.uses_savepoints:
    4242            return
    43         self.connection.cursor().execute(self.ops.savepoint_create_sql(sid))
     43        self.cursor().execute(self.ops.savepoint_create_sql(sid))
    4444
    4545    def _savepoint_rollback(self, sid):
    4646        if not self.features.uses_savepoints:
    4747            return
    48         self.connection.cursor().execute(self.ops.savepoint_rollback_sql(sid))
     48        self.cursor().execute(self.ops.savepoint_rollback_sql(sid))
    4949
    5050    def _savepoint_commit(self, sid):
    5151        if not self.features.uses_savepoints:
    5252            return
    53         self.connection.cursor().execute(self.ops.savepoint_commit_sql(sid))
     53        self.cursor().execute(self.ops.savepoint_commit_sql(sid))
    5454
    5555    def close(self):
    5656        if self.connection is not None:
Back to Top