Fix alembic migrations importing app

Ensure we connect to loaded config db
This commit is contained in:
Sam Chow 2018-06-19 13:46:34 -04:00
parent bb2b28cd11
commit b5f630ba29
18 changed files with 69 additions and 81 deletions

View file

@ -4,6 +4,8 @@ from config_app.config_endpoints.api.suconfig_models_interface import SuperuserC
class PreOCIModel(SuperuserConfigDataInterface):
# Note: this method is different than has_users: the user select will throw if the user
# table does not exist, whereas has_users assumes the table is valid
def is_valid(self):
try:
list(User.select().limit(1))