Permalink
Browse files

Fixed #18989 -- Removed unused condition in CursorWrapper

Thanks zimnyx for the report.
  • Loading branch information...
1 parent 7a38e86 commit 8c69278764ae31b0cd495d21b84444bf2471c103 @claudep claudep committed Nov 17, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 django/db/backends/util.py
@@ -24,11 +24,9 @@ def set_dirty(self):
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)

0 comments on commit 8c69278

Please sign in to comment.