mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Don't delete library history if server_id doesn't match
This commit is contained in:
parent
e0cd6f7071
commit
523e6421be
3 changed files with 37 additions and 22 deletions
|
@ -681,9 +681,10 @@ class Users(object):
|
|||
return all(success)
|
||||
|
||||
elif str(user_id).isdigit():
|
||||
database.delete_user_history(user_id=user_id)
|
||||
delete_success = database.delete_user_history(user_id=user_id)
|
||||
|
||||
if purge_only:
|
||||
return True
|
||||
return delete_success
|
||||
else:
|
||||
logger.info(u"Tautulli Users :: Deleting user with user_id %s from database."
|
||||
% user_id)
|
||||
|
@ -691,7 +692,7 @@ class Users(object):
|
|||
monitor_db.action('UPDATE users '
|
||||
'SET deleted_user = 1, keep_history = 0, do_notify = 0 '
|
||||
'WHERE user_id = ?', [user_id])
|
||||
return True
|
||||
return delete_success
|
||||
except Exception as e:
|
||||
logger.warn(u"Tautulli Users :: Unable to execute database query for delete: %s." % e)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue