1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
This commit is contained in:
Steffo 2017-03-22 19:16:56 +01:00
parent b353883b07
commit 145966c3b1

View file

@ -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:
session = Session()
# Generate the database if it's empty
if session.query(User).first() is None:
init_royal_db()
del session