mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 22:44:24 +01:00
Don't create two sqlite dbs
This commit is contained in:
@@ -33,7 +33,7 @@ def create_app(config='CTFd.config'):
|
|||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not database_exists(url):
|
if not (url.drivername.startswith('sqlite') or database_exists(url)):
|
||||||
create_database(url)
|
create_database(url)
|
||||||
db.create_all()
|
db.create_all()
|
||||||
except OperationalError:
|
except OperationalError:
|
||||||
|
|||||||
Reference in New Issue
Block a user