mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Add "Local" as the default unauthenticated user to the local database.
This commit is contained in:
parent
883a183208
commit
c2417de895
1 changed files with 6 additions and 0 deletions
|
@ -588,6 +588,12 @@ def dbcheck():
|
||||||
'ALTER TABLE users ADD COLUMN custom_avatar_url TEXT'
|
'ALTER TABLE users ADD COLUMN custom_avatar_url TEXT'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add "Local" user to database as default unauthenticated user.
|
||||||
|
result = c_db.execute('SELECT id FROM users WHERE username = "Local"')
|
||||||
|
if not result.fetchone():
|
||||||
|
logger.debug(u'User "Local" does not exist. Adding user.')
|
||||||
|
c_db.execute('INSERT INTO users (user_id, username) VALUES (0, "Local")')
|
||||||
|
|
||||||
conn_db.commit()
|
conn_db.commit()
|
||||||
c_db.close()
|
c_db.close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue