Merge pull request #102 from janeczku/fix-db-init

Fix typo; raise exception when creating database
pull/104/head
Ozzie Isaacs 8 years ago committed by GitHub
commit e41b6aff99

@ -419,7 +419,7 @@ def create_admin_user():
user.nickname = "admin" user.nickname = "admin"
user.role = ROLE_USER + ROLE_ADMIN + ROLE_DOWNLOAD + ROLE_UPLOAD + ROLE_EDIT + ROLE_PASSWD user.role = ROLE_USER + ROLE_ADMIN + ROLE_DOWNLOAD + ROLE_UPLOAD + ROLE_EDIT + ROLE_PASSWD
user.sidebar_view = DETAIL_RANDOM + SIDEBAR_LANGUAGE + SIDEBAR_SERIES + SIDEBAR_CATEGORY + SIDEBAR_HOT + \ user.sidebar_view = DETAIL_RANDOM + SIDEBAR_LANGUAGE + SIDEBAR_SERIES + SIDEBAR_CATEGORY + SIDEBAR_HOT + \
SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIEDBAR_BEST_RATED SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIDEBAR_BEST_RATED
user.password = generate_password_hash(DEFAULT_PASS) user.password = generate_password_hash(DEFAULT_PASS)
@ -444,7 +444,7 @@ if not os.path.exists(dbpath):
create_admin_user() create_admin_user()
create_anonymous_user() create_anonymous_user()
except Exception: except Exception:
pass raise
else: else:
migrate_Database() migrate_Database()

Loading…
Cancel
Save