Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expressed the dirty flag handling logic in terms of autocommit.

  • Loading branch information...
commit 7b4815b455fc99a2661492f91f7242cfb09a7017 1 parent cd364ef
@aaugustin aaugustin authored
View
3  django/db/backends/__init__.py
@@ -311,7 +311,8 @@ def set_dirty(self):
to decide in a managed block of code to decide whether there are open
changes waiting for commit.
"""
- self._dirty = True
+ if not self.autocommit:
+ self._dirty = True
def set_clean(self):
"""
View
4 django/db/backends/postgresql_psycopg2/base.py
@@ -202,10 +202,6 @@ def _set_autocommit(self, autocommit):
level = self.isolation_level
self.connection.set_isolation_level(level)
- def set_dirty(self):
- if self.transaction_state and self.transaction_state[-1]:
- super(DatabaseWrapper, self).set_dirty()
-
def check_constraints(self, table_names=None):
"""
To check constraints, we set constraints to immediate. Then, when, we're done we must ensure they
Please sign in to comment.
Something went wrong with that request. Please try again.