mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Return empty list for datatable errors
This commit is contained in:
parent
5ca8184948
commit
674966510d
4 changed files with 15 additions and 22 deletions
|
@ -103,8 +103,7 @@ class Users(object):
|
|||
default_return = {'recordsFiltered': 0,
|
||||
'recordsTotal': 0,
|
||||
'draw': 0,
|
||||
'data': 'null',
|
||||
'error': 'Unable to execute database query.'}
|
||||
'data': []}
|
||||
|
||||
data_tables = datatables.DataTables()
|
||||
|
||||
|
@ -241,8 +240,7 @@ class Users(object):
|
|||
default_return = {'recordsFiltered': 0,
|
||||
'recordsTotal': 0,
|
||||
'draw': 0,
|
||||
'data': 'null',
|
||||
'error': 'Unable to execute database query.'}
|
||||
'data': []}
|
||||
|
||||
if not session.allow_session_user(user_id):
|
||||
return default_return
|
||||
|
@ -871,8 +869,7 @@ class Users(object):
|
|||
default_return = {'recordsFiltered': 0,
|
||||
'recordsTotal': 0,
|
||||
'draw': 0,
|
||||
'data': 'null',
|
||||
'error': 'Unable to execute database query.'}
|
||||
'data': []}
|
||||
|
||||
if not session.allow_session_user(user_id):
|
||||
return default_return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue