Fix error case in uploading tar, more comments

This commit is contained in:
Sam Chow 2018-06-22 13:21:44 -04:00
parent d6d0bb640a
commit 872be8605a
6 changed files with 37 additions and 17 deletions

View file

@ -21,8 +21,12 @@ from util.morecollections import AttrDict
config = context.config
DB_URI = config.get_main_option('db_uri', 'sqlite:///test/data/test.db')
# This option exists because alembic needs the db proxy to be configured in order
# to perform migrations. The app import does the init of the proxy, but we don't
# want that in the case of the config app, as we are explicitly connecting to a
# db that the user has passed in, and we can't have import dependency on app
if config.get_main_option('alembic_setup_app', 'True') == 'True':
# needed for db connections
from app import app
DB_URI = app.config['DB_URI']