fix api config on ci - #15

This commit is contained in:
Sam 2019-11-20 12:31:58 +01:00
parent 624f40e1d8
commit 227d26cb9e
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 49668bbf739dde28729baae15bc4e905
config: 30c5e5361bea086cc59c229f2ef9de12
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -3,7 +3,10 @@ import shutil
from fittrackee_api import create_app, db
from fittrackee_api.activities.models import Activity, Sport
from fittrackee_api.activities.utils import update_activity
from fittrackee_api.application.utils import init_config
from fittrackee_api.application.utils import (
init_config,
update_app_config_from_database,
)
from fittrackee_api.users.models import User
from tqdm import tqdm
@ -55,6 +58,10 @@ def initdata():
sport.is_default = True
db.session.add(sport)
db.session.commit()
# update app config
_, db_app_config = init_config()
update_app_config_from_database(app, db_app_config)
print('Initial data stored in database.')