diff options
author | Tharre <tharre3@gmail.com> | 2017-08-30 23:03:57 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2017-08-30 23:03:57 +0200 |
commit | d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1 (patch) | |
tree | 9e342e3a65f61a56e1532629436e57e4acc8e564 | |
parent | e2d76858affb83619ba16437b1b6b0171f7e1cf1 (diff) | |
download | albion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.tar.gz albion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.tar.xz albion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.zip |
Run init_db() at the start, not in init_db()
-rwxr-xr-x | app.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,10 +14,10 @@ DATABASE = 'db.sqlite3' cache = SimpleCache() -def init_db(): - if not os.path.isfile(DATABASE): - init_db() +if not os.path.isfile(DATABASE): + init_db() +def init_db(): with app.app_context(): db = get_db() with app.open_resource('schema.sql', mode='r') as f: |