mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Simplify user delete loop
This commit is contained in:
parent
faac6b11c2
commit
104e2929df
2 changed files with 5 additions and 5 deletions
|
@ -673,11 +673,10 @@ class Users(object):
|
|||
# Get the user_ids corresponding to the row_ids
|
||||
result = monitor_db.select('SELECT user_id FROM users '
|
||||
'WHERE id IN ({})'.format(','.join(['?'] * len(row_ids))), row_ids)
|
||||
user_ids = [user['user_id'] for user in result]
|
||||
|
||||
success = []
|
||||
for user_id in user_ids:
|
||||
success.append(self.delete(user_id=user_id, purge_only=purge_only))
|
||||
for user in result:
|
||||
success.append(self.delete(user_id=user['user_id'], purge_only=purge_only))
|
||||
return all(success)
|
||||
|
||||
elif str(user_id).isdigit():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue