Skip to content

Commit 3b34884

Browse files
committed
The hasattr check is not defined. As types will always have a is_type_of function.
1 parent b720e2c commit 3b34884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql/core/execution/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def complete_value(self, ctx, return_type, field_asts, info, result):
270270
if not runtime_type:
271271
return None
272272

273-
if hasattr(runtime_type, 'is_type_of') and not runtime_type.is_type_of(result, info):
273+
if not runtime_type.is_type_of(result, info):
274274
raise GraphQLError(
275275
u'Expected value of type "{}" but got {}.'.format(return_type, result),
276276
field_asts

0 commit comments

Comments
 (0)