From c5b15cec2f0a7082006b94314ca45ee1322af60d Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 4 Feb 2016 14:23:59 -0800 Subject: [PATCH] Removed the collision with django-debug-toolbar tracking. #108 --- graphene/contrib/django/debug/sql/tracking.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/graphene/contrib/django/debug/sql/tracking.py b/graphene/contrib/django/debug/sql/tracking.py index 8ed40492..47f7a30c 100644 --- a/graphene/contrib/django/debug/sql/tracking.py +++ b/graphene/contrib/django/debug/sql/tracking.py @@ -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