From 5c58d9e686e887abaf5f37d339637b90f9c04e6e Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 26 Jul 2017 22:32:37 -0700 Subject: [PATCH] Fixed lazy type instant resolved with NonNull. Fixed #494 --- graphene/types/structures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphene/types/structures.py b/graphene/types/structures.py index 38fa5609..dcd9d5e3 100644 --- a/graphene/types/structures.py +++ b/graphene/types/structures.py @@ -68,9 +68,9 @@ class NonNull(Structure): def __init__(self, *args, **kwargs): super(NonNull, self).__init__(*args, **kwargs) - assert not isinstance(self.of_type, NonNull), ( + assert not isinstance(self._of_type, NonNull), ( 'Can only create NonNull of a Nullable GraphQLType but got: {}.' - ).format(self.of_type) + ).format(self._of_type) def __str__(self): return '{}!'.format(self.of_type)