mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +03:00
Removed the collision with django-debug-toolbar tracking. #108
This commit is contained in:
parent
457ecbe491
commit
c5b15cec2f
|
@ -33,19 +33,19 @@ recording = state.recording # export function
|
|||
|
||||
|
||||
def wrap_cursor(connection, panel):
|
||||
if not hasattr(connection, '_djdt_cursor'):
|
||||
connection._djdt_cursor = connection.cursor
|
||||
if not hasattr(connection, '_graphene_cursor'):
|
||||
connection._graphene_cursor = connection.cursor
|
||||
|
||||
def cursor():
|
||||
return state.Wrapper(connection._djdt_cursor(), connection, panel)
|
||||
return state.Wrapper(connection._graphene_cursor(), connection, panel)
|
||||
|
||||
connection.cursor = cursor
|
||||
return cursor
|
||||
|
||||
|
||||
def unwrap_cursor(connection):
|
||||
if hasattr(connection, '_djdt_cursor'):
|
||||
del connection._djdt_cursor
|
||||
if hasattr(connection, '_graphene_cursor'):
|
||||
del connection._graphene_cursor
|
||||
del connection.cursor
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user