mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 10:37:23 +00:00
Fix session.rollback on admin account creation
This commit is contained in:
parent
3719b7e4eb
commit
1e2a6f2ffb
@ -183,7 +183,11 @@ def create_admin_user():
|
|||||||
user.password = generate_password_hash(DEFAULT_PASS)
|
user.password = generate_password_hash(DEFAULT_PASS)
|
||||||
|
|
||||||
session.add(user)
|
session.add(user)
|
||||||
session.commit()
|
try:
|
||||||
|
session.commit()
|
||||||
|
except:
|
||||||
|
session.rollback()
|
||||||
|
pass
|
||||||
|
|
||||||
Session = sessionmaker()
|
Session = sessionmaker()
|
||||||
Session.configure(bind=engine)
|
Session.configure(bind=engine)
|
||||||
|
Loading…
Reference in New Issue
Block a user