Skip to content

Commit 0eb02ed

Browse files
committed
exec module earlier
1 parent 980d9b4 commit 0eb02ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serverless_openapi_generator/pydantic_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def generate_dto_schemas(source_dir: Path, output_dir: Path, project_root: Path)
9696
spec = importlib.util.spec_from_file_location(module_name, dto_file_path)
9797
if spec and spec.loader:
9898
module = importlib.util.module_from_spec(spec)
99-
sys.modules[module_name] = module
10099
spec.loader.exec_module(module)
100+
sys.modules[module_name] = module
101101
else:
102102
rprint(f"\t[yellow]Could not create module spec for {dto_file_path}[/yellow]")
103103
continue

0 commit comments

Comments
 (0)