We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5d5afa commit ae60caaCopy full SHA for ae60caa
pylon/core/tools/module/descriptor.py
@@ -497,6 +497,7 @@ def init_db(self):
497
from pylon.framework.db import db_migrations # pylint: disable=C0415
498
# Step: load models
499
module_pkg = self.loader.module_name
500
+ module_name = module_pkg.split(".")[1]
501
#
502
if self.loader.has_directory("db/models"):
503
for model_resource in importlib.resources.contents(
@@ -520,7 +521,7 @@ def init_db(self):
520
521
)
522
continue
523
# Step: create entities
- module_this = this.for_module(module_pkg)
524
+ module_this = this.for_module(module_name)
525
module_this.db.metadata.create_all(bind=self.context.db.engine)
526
527
db_namespace_helper = module_this.spaces.get("db_namespace_helper", None)
0 commit comments