##// END OF EJS Templates
fix: startup, report nicer error in case DB is damaged or empty when starting services
super-admin -
r5462:6ef12567 default
parent child Browse files
Show More
@@ -102,6 +102,9 b' def get_default_user_id():'
102 result = session.execute(text(
102 result = session.execute(text(
103 "SELECT user_id from users where username = :uname"
103 "SELECT user_id from users where username = :uname"
104 ), {'uname': DEFAULT_USER})
104 ), {'uname': DEFAULT_USER})
105 user_id = result.first()[0]
105 user = result.first()
106 if not user:
107 raise ValueError('Unable to retrieve default user data from DB')
108 user_id = user[0]
106
109
107 return user_id
110 return user_id
General Comments 0
You need to be logged in to leave comments. Login now