Skip to content

Commit

Permalink
Fix problem with path_to_template
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed May 29, 2024
1 parent ade6424 commit cfb6837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ontogpt/io/template_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def get_template_details(template: TEMPLATE_NAME) -> ClassDefinition:

else:
logger.info(f"Loading schema for {template}")
path_to_template = get_template_path(module_name)
sv = SchemaView(path_to_template)
if "." in template:
module_name, class_name = template.split(".", 1)
else:
module_name = template
class_name = None
path_to_template = get_template_path(module_name)
mod = importlib.import_module(f"ontogpt.templates.{module_name}")

if class_name is None:
Expand Down

0 comments on commit cfb6837

Please sign in to comment.