summaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2017-08-30 23:03:57 +0200
committerTharre <tharre3@gmail.com>2017-08-30 23:03:57 +0200
commitd5a8c3a777445b67f1fc46d4fa4e41133b3f26e1 (patch)
tree9e342e3a65f61a56e1532629436e57e4acc8e564 /app.py
parente2d76858affb83619ba16437b1b6b0171f7e1cf1 (diff)
downloadalbion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.tar.gz
albion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.tar.xz
albion-api-d5a8c3a777445b67f1fc46d4fa4e41133b3f26e1.zip
Run init_db() at the start, not in init_db()
Diffstat (limited to 'app.py')
-rwxr-xr-xapp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.py b/app.py
index 410ad0d..955d1a8 100755
--- a/app.py
+++ b/app.py
@@ -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: