mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 06:13:25 -07:00
fix no data error and webserve definition
This commit is contained in:
parent
7335c9499c
commit
e95d603508
2 changed files with 2 additions and 2 deletions
|
@ -1332,7 +1332,7 @@ class DataFactory(object):
|
|||
logger.warn("Tautulli Libraries :: Unable to execute database query for get_user_stats: %s." % e)
|
||||
result = []
|
||||
|
||||
if show_all_users == 'true':
|
||||
if show_all_users == 'true' and not result == []:
|
||||
users_to_exlude = '(0,' + ','.join([str(x['user_id']) for x in result]) + ')'
|
||||
|
||||
query = 'SELECT (CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" ' \
|
||||
|
|
|
@ -4476,7 +4476,7 @@ class WebInterface(object):
|
|||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
def item_user_stats(self, rating_key=None, media_type=None, **kwargs):
|
||||
def item_user_stats(self, rating_key=None, media_type=None, show_all_users=None, **kwargs):
|
||||
if rating_key:
|
||||
item_data = datafactory.DataFactory()
|
||||
result = item_data.get_user_stats(rating_key=rating_key, media_type=media_type, show_all_users=show_all_users)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue