fix: migration module name
This commit is contained in:
parent
a6e3b5e049
commit
08be621529
1 changed files with 2 additions and 4 deletions
|
|
@ -17,10 +17,8 @@ from .crud import update_migration_version
|
|||
|
||||
async def migrate_extension_database(ext, current_version):
|
||||
try:
|
||||
ext_migrations = importlib.import_module(
|
||||
f"lnbits.extensions.{ext.code}.migrations"
|
||||
)
|
||||
ext_db = importlib.import_module(f"lnbits.extensions.{ext.code}").db
|
||||
ext_migrations = importlib.import_module(f"{ext.module_name}.migrations")
|
||||
ext_db = importlib.import_module(ext.module_name).db
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
f"Please make sure that the extension `{ext.code}` has a migrations file."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue