mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-16 15:07:13 +00:00
Fix change user (in case of reboot required)
Fix no existing database Update required version for sqlalchemy
This commit is contained in:
@@ -318,8 +318,10 @@ def setup_db():
|
||||
return False
|
||||
|
||||
dbpath = os.path.join(config.config_calibre_dir, "metadata.db")
|
||||
engine = create_engine('sqlite:///' + dbpath, echo=False, isolation_level="SERIALIZABLE")
|
||||
try:
|
||||
if not os.path.exists(dbpath):
|
||||
raise
|
||||
engine = create_engine('sqlite:///' + dbpath, echo=False, isolation_level="SERIALIZABLE")
|
||||
conn = engine.connect()
|
||||
except Exception:
|
||||
content = ub.session.query(ub.Settings).first()
|
||||
|
||||
Reference in New Issue
Block a user