From 145966c3b17812b3bfc37e380a9d3b7d63de2460 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 22 Mar 2017 19:16:56 +0100 Subject: [PATCH] bugfics --- database.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/database.py b/database.py index 1034427d..8815225a 100644 --- a/database.py +++ b/database.py @@ -115,7 +115,8 @@ def init_royal_db(): create_user("voltaggio", "ventitre", True) create_user("doc", "ventiquattro", True) -with Session() as session: - # Generate the database if it's empty - if session.query(User).first() is None: - init_royal_db() +session = Session() +# Generate the database if it's empty +if session.query(User).first() is None: + init_royal_db() +del session \ No newline at end of file