Fix the imports for the model db.
This commit is contained in:
parent
62deddce24
commit
acbb075d13
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from app import app as application
|
from app import app as application
|
||||||
|
from data.model import db as model_db
|
||||||
|
|
||||||
import model
|
|
||||||
|
|
||||||
logging.basicConfig(**application.config['LOGGING_CONFIG'])
|
logging.basicConfig(**application.config['LOGGING_CONFIG'])
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ application.register_blueprint(webhooks, url_prefix='/webhooks')
|
||||||
|
|
||||||
|
|
||||||
def close_db(exc):
|
def close_db(exc):
|
||||||
db = model.db
|
db = model_db
|
||||||
if not db.is_closed():
|
if not db.is_closed():
|
||||||
logger.debug('Disconnecting from database.')
|
logger.debug('Disconnecting from database.')
|
||||||
db.close()
|
db.close()
|
||||||
|
|
Reference in a new issue