mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Refactor database delete_session_history_rows ids
This commit is contained in:
parent
38f64c7d85
commit
c979e78802
3 changed files with 25 additions and 22 deletions
|
@ -1871,12 +1871,14 @@ class WebInterface(object):
|
|||
data_factory = datafactory.DataFactory()
|
||||
|
||||
if row_ids:
|
||||
delete_row = data_factory.delete_session_history_rows(row_ids=row_ids)
|
||||
success = database.delete_session_history_rows(row_ids=row_ids)
|
||||
|
||||
if delete_row:
|
||||
return {'message': delete_row}
|
||||
if success:
|
||||
return {'result': 'success', 'message': 'Deleted history.'}
|
||||
else:
|
||||
return {'result': 'error', 'message': 'Failed to delete history.'}
|
||||
else:
|
||||
return {'message': 'No row ids received.'}
|
||||
return {'result': 'error', 'message': 'No row ids received.'}
|
||||
|
||||
|
||||
##### Graphs #####
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue