Skip to content

Commit

Permalink
Merge pull request #282 from linkml/RichardBruskiewich-patch-1
Browse files Browse the repository at this point in the history
bug fix in _construct_target_class()
  • Loading branch information
RichardBruskiewich authored Nov 6, 2023
2 parents 687fc53 + 0be3c4a commit 1feeb08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkml_runtime/loaders/loader_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _construct_target_class(self,
if issubclass(target_class, YAMLRoot):
return [target_class(**as_dict(x)) for x in data_as_dict]
elif issubclass(target_class, BaseModel):
return [target_class.parse_obj(**as_dict(x)) for x in data_as_dict]
return [target_class.parse_obj(as_dict(x)) for x in data_as_dict]
else:
raise ValueError(f'Cannot load list of {target_class}')
elif isinstance(data_as_dict, dict):
Expand Down Expand Up @@ -153,4 +153,4 @@ def _read_source(self,
else:
data = source

return data
return data

0 comments on commit 1feeb08

Please sign in to comment.