mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.5.x] Fixed #18989 -- Removed unused condition in CursorWrapper
Thanks zimnyx for the report. Backport of 8c6927876 from master.
This commit is contained in:
parent
11539aad1e
commit
a023952e10
@ -24,11 +24,9 @@ class CursorWrapper(object):
|
|||||||
self.db.set_dirty()
|
self.db.set_dirty()
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
self.set_dirty()
|
if attr in ('execute', 'executemany', 'callproc'):
|
||||||
if attr in self.__dict__:
|
self.set_dirty()
|
||||||
return self.__dict__[attr]
|
return getattr(self.cursor, attr)
|
||||||
else:
|
|
||||||
return getattr(self.cursor, attr)
|
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.cursor)
|
return iter(self.cursor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user