mirror of
https://github.com/solero/houdini.git
synced 2024-11-13 22:28:21 +00:00
Check if converter is a class before trying to instantiate it
This commit is contained in:
parent
03a22a28b7
commit
dbf7e4d35e
@ -472,6 +472,7 @@ def get_converter(component):
|
|||||||
|
|
||||||
|
|
||||||
async def do_conversion(converter, ctx):
|
async def do_conversion(converter, ctx):
|
||||||
|
if inspect.isclass(converter):
|
||||||
if not isinstance(converter, IConverter) 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):
|
||||||
|
Loading…
Reference in New Issue
Block a user