From 0d4164648fc3af8ed6358570e665f9b1cd636cb5 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 19 Nov 2015 20:00:10 -0800 Subject: [PATCH] Fixed instance getter using _root. --- graphene/contrib/django/types.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/graphene/contrib/django/types.py b/graphene/contrib/django/types.py index 430b410d..f17893f0 100644 --- a/graphene/contrib/django/types.py +++ b/graphene/contrib/django/types.py @@ -49,6 +49,14 @@ class InstanceObjectType(BaseObjectType): )) super(InstanceObjectType, self).__init__(_root=_root) + @property + def instance(self): + return self._root + + @instance.setter + def instance(self, value): + self._root = value + def __getattr__(self, attr): return getattr(self._root, attr)