diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-11-17 10:51:30 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-11-17 16:54:12 +0100 |
| commit | a023952e10092775215aeb2277d2fe3af5794e3b (patch) | |
| tree | 8391915a9832fdd74e201b4f74d2e59bf425a946 | |
| parent | 11539aad1eb72ec9ec579f5440db90c4b0911283 (diff) | |
[1.5.x] Fixed #18989 -- Removed unused condition in CursorWrapper
Thanks zimnyx for the report.
Backport of 8c6927876 from master.
| -rw-r--r-- | django/db/backends/util.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/django/db/backends/util.py b/django/db/backends/util.py index e029c42899..1ba23060e0 100644 --- a/django/db/backends/util.py +++ b/django/db/backends/util.py @@ -24,11 +24,9 @@ class CursorWrapper(object): self.db.set_dirty() def __getattr__(self, attr): - self.set_dirty() - if attr in self.__dict__: - return self.__dict__[attr] - else: - return getattr(self.cursor, attr) + if attr in ('execute', 'executemany', 'callproc'): + self.set_dirty() + return getattr(self.cursor, attr) def __iter__(self): return iter(self.cursor) |
