From d805de1dfbf3a0071268dcebf3a3b888461886b4 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 26 May 2020 00:56:00 +0100 Subject: [PATCH] Fix converter type check --- houdini/converters.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/houdini/converters.py b/houdini/converters.py index d57d946..65a74f5 100644 --- a/houdini/converters.py +++ b/houdini/converters.py @@ -472,11 +472,10 @@ def get_converter(component): async def do_conversion(converter, ctx): - if inspect.isclass(converter): - if not isinstance(converter, IConverter) and issubclass(converter, IConverter): - converter = converter() - if isinstance(converter, IConverter): - if asyncio.iscoroutinefunction(converter.convert): - return await converter.convert(ctx) - return converter.convert(ctx) + if inspect.isclass(converter) and issubclass(converter, IConverter): + converter = converter() + if isinstance(converter, IConverter): + if asyncio.iscoroutinefunction(converter.convert): + return await converter.convert(ctx) + return converter.convert(ctx) return converter(ctx.argument)