mirror of
https://github.com/solero/houdini.git
synced 2024-11-22 05:27:23 +00:00
Fix converter type check
This commit is contained in:
parent
e60ea69b7e
commit
d805de1dfb
@ -472,11 +472,10 @@ def get_converter(component):
|
|||||||
|
|
||||||
|
|
||||||
async def do_conversion(converter, ctx):
|
async def do_conversion(converter, ctx):
|
||||||
if inspect.isclass(converter):
|
if inspect.isclass(converter) and issubclass(converter, IConverter):
|
||||||
if not isinstance(converter, IConverter) and issubclass(converter, IConverter):
|
converter = converter()
|
||||||
converter = converter()
|
if isinstance(converter, IConverter):
|
||||||
if isinstance(converter, IConverter):
|
if asyncio.iscoroutinefunction(converter.convert):
|
||||||
if asyncio.iscoroutinefunction(converter.convert):
|
return await converter.convert(ctx)
|
||||||
return await converter.convert(ctx)
|
return converter.convert(ctx)
|
||||||
return converter.convert(ctx)
|
|
||||||
return converter(ctx.argument)
|
return converter(ctx.argument)
|
||||||
|
Loading…
Reference in New Issue
Block a user