handle wrapper types in create object

This commit is contained in:
iLLiCiTiT 2021-06-24 11:20:07 +02:00
parent 568c6e5f61
commit 083dd58b39

View file

@ -271,6 +271,12 @@ class SchemasHub:
"Got unresolved schema data of type \"{}\"".format(schema_type)
)
if schema_type in WRAPPER_TYPES:
raise ValueError((
"Function `create_schema_object` can't create entities"
" of any wrapper type. Got type: \"{}\""
).format(schema_type))
klass = self._loaded_types.get(schema_type)
if not klass:
raise KeyError("Unknown type \"{}\"".format(schema_type))