Don't create two sqlite dbs

This commit is contained in:
Kevin Chung
2016-11-04 00:37:41 -04:00
parent 332bd656fd
commit a6f641dda3

View File

@@ -33,7 +33,7 @@ def create_app(config='CTFd.config'):
db.init_app(app)
try:
if not database_exists(url):
if not (url.drivername.startswith('sqlite') or database_exists(url)):
create_database(url)
db.create_all()
except OperationalError: