Commit 09ba70f9 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Made transaction management work even before the first SQL query.

Thanks Florian again.
parent 7c46c8d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -269,6 +269,8 @@ class BaseDatabaseWrapper(object):
        """
        self.validate_no_atomic_block()

        self.ensure_connection()

        self.transaction_state.append(managed)

        if not managed and self.is_dirty() and not forced:
@@ -286,6 +288,8 @@ class BaseDatabaseWrapper(object):
        """
        self.validate_no_atomic_block()

        self.ensure_connection()

        if self.transaction_state:
            del self.transaction_state[-1]
        else: