From ba4f45a7f3277bfb4ea557598c80c79e23534768 Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Nov 11 2019 16:13:22 +0000 Subject: Merge #1503 `Configure the MBS backend code to use the correct SQLite database during local builds` --- diff --git a/module_build_service/manage.py b/module_build_service/manage.py index 0b0c74b..8fc1e19 100755 --- a/module_build_service/manage.py +++ b/module_build_service/manage.py @@ -144,6 +144,9 @@ def build_module_locally( os.remove(dbpath) db.create_all() + # Reconfigure the backend database session registry to use the new the database location + db_session.remove() + db_session.configure(bind=db.session.bind) params = { "local_build": True, @@ -158,8 +161,6 @@ def build_module_locally( yaml_file_path = os.path.abspath(yaml_file) - from module_build_service.db_session import db_session - if offline: import_builds_from_local_dnf_repos(platform_id) load_local_builds(local_build_nsvs)