mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Clear user friendly name if equal to username
This commit is contained in:
parent
98433a7c54
commit
285fa3a0f5
2 changed files with 12 additions and 0 deletions
|
@ -1920,6 +1920,14 @@ def dbcheck():
|
|||
'ALTER TABLE users ADD COLUMN title TEXT'
|
||||
)
|
||||
|
||||
try:
|
||||
result = c_db.execute('SELECT * FROM users WHERE friendly_name = username').fetchall()
|
||||
if result:
|
||||
logger.debug("Altering database. Resetting user friendly names equal to username.")
|
||||
c_db.execute('UPDATE users SET friendly_name = NULL WHERE friendly_name = username')
|
||||
except sqlite3.OperationalError:
|
||||
pass
|
||||
|
||||
# Upgrade notify_log table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT poster_url FROM notify_log')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue