From 6e387444f5a6eacb16ab056e0fd3f1a3f5340e47 Mon Sep 17 00:00:00 2001 From: Son NK Date: Fri, 6 Dec 2019 10:20:46 +0100 Subject: [PATCH] do not use RESET_DB to avoid potential error: uncomment fake_date locally if necessary --- app/config.py | 1 - server.py | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/config.py b/app/config.py index 4407ef14..a71411b0 100644 --- a/app/config.py +++ b/app/config.py @@ -50,7 +50,6 @@ EMAIL_SERVERS_WITH_PRIORITY = eval( EMAIL_SERVERS = [es for _, es in EMAIL_SERVERS_WITH_PRIORITY] # Database -RESET_DB = "RESET_DB" in os.environ DB_URI = os.environ["DB_URI"] # Flask secret diff --git a/server.py b/server.py index f3619c83..2542f17b 100644 --- a/server.py +++ b/server.py @@ -19,7 +19,6 @@ from app.config import ( ENABLE_SENTRY, URL, SHA1, - RESET_DB, PADDLE_MONTHLY_PRODUCT_ID, ) from app.dashboard.base import dashboard_bp @@ -379,10 +378,10 @@ if __name__ == "__main__": # enable to print all queries generated by sqlalchemy # app.config["SQLALCHEMY_ECHO"] = True - if RESET_DB: - LOG.d("reset db, add fake data") - with app.app_context(): - fake_data() + # warning: only used in local + # LOG.d("reset db, add fake data") + # with app.app_context(): + # fake_data() if URL.startswith("https"): LOG.d("enable https")