Skip to content

Commit 271e6a1

Browse files
committed
init_database takes 1 parameter : db_path
1 parent 1ed8804 commit 271e6a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/opengeodeweb_back/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,13 @@ def run_server() -> None:
140140
flush=True,
141141
)
142142

143-
db_filename: str = app.config.get("DATABASE_FILENAME") or "database.db"
143+
db_filename: str = app.config.get("DATABASE_FILENAME")
144144
db_path = os.path.join(args.data_folder_path, db_filename)
145145
os.makedirs(os.path.dirname(db_path), exist_ok=True)
146146
app.config["SQLALCHEMY_DATABASE_URI"] = f"sqlite:///{db_path}"
147147
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
148-
init_database(app, db_filename)
148+
149+
init_database(db_path)
149150
print(f"Database initialized at: {db_path}", flush=True)
150151

151152
app.run(debug=args.debug, host=args.host, port=args.port, ssl_context=SSL)

0 commit comments

Comments
 (0)