diff --git a/houdini/converters.py b/houdini/converters.py index e780401..d57d946 100644 --- a/houdini/converters.py +++ b/houdini/converters.py @@ -472,10 +472,11 @@ def get_converter(component): async def do_conversion(converter, ctx): - 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): + 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) return converter(ctx.argument)