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 |
|
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