Skip to content

Commit 33ce3c5

Browse files
committed
wip
1 parent 89bb77f commit 33ce3c5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

orga2Utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
from sqlalchemy.orm import sessionmaker
66
from sqlalchemy import func
77
# Local imports
8-
from models import AsmInstruction, Noitip, Session
8+
from models import AsmInstruction, Noitip, Session, init_db
99

1010
@contextmanager
1111
def get_session():
1212
"""Provide a transactional scope around a series of operations."""
13+
global Session
14+
if Session is None:
15+
init_db()
1316
session = Session()
1417
try:
1518
yield session

0 commit comments

Comments
 (0)