mirror of
https://github.com/simple-login/app.git
synced 2025-02-22 14:53:34 +08:00
do not use RESET_DB to avoid potential error: uncomment fake_date locally if necessary
This commit is contained in:
parent
a5615b22e7
commit
6e387444f5
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue