mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +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)
|
||||
|
||||
try:
|
||||
if not database_exists(url):
|
||||
if not (url.drivername.startswith('sqlite') or database_exists(url)):
|
||||
create_database(url)
|
||||
db.create_all()
|
||||
except OperationalError:
|
||||
|
||||
Reference in New Issue
Block a user