File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def chunked_cursor(*args, **kwargs):
5858 # prevent double wrapping
5959 # solves https://github.com/jazzband/django-debug-toolbar/issues/1239
6060 cursor = connection ._djdt_chunked_cursor (* args , ** kwargs )
61- if not isinstance (cursor , state . Wrapper ):
61+ if not isinstance (cursor , BaseCursorWrapper ):
6262 return state .Wrapper (cursor , connection , panel )
6363 return cursor
6464
@@ -74,7 +74,11 @@ def unwrap_cursor(connection):
7474 del connection .chunked_cursor
7575
7676
77- class ExceptionCursorWrapper :
77+ class BaseCursorWrapper :
78+ pass
79+
80+
81+ class ExceptionCursorWrapper (BaseCursorWrapper ):
7882 """
7983 Wraps a cursor and raises an exception on any operation.
8084 Used in Templates panel.
@@ -87,7 +91,7 @@ def __getattr__(self, attr):
8791 raise SQLQueryTriggered ()
8892
8993
90- class NormalCursorWrapper :
94+ class NormalCursorWrapper ( BaseCursorWrapper ) :
9195 """
9296 Wraps a cursor and logs queries.
9397 """
You can’t perform that action at this time.
0 commit comments