mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
parent
1f87799e57
commit
5a4ee2179a
1 changed files with 7 additions and 8 deletions
|
@ -71,16 +71,15 @@ class DataFactory(object):
|
||||||
|
|
||||||
for c_where in custom_where:
|
for c_where in custom_where:
|
||||||
if 'user_id' in c_where[0]:
|
if 'user_id' in c_where[0]:
|
||||||
# This currently only works if c_where[1] is not a list or tuple
|
if isinstance(c_where[1], list) and session_user_id not in c_where[1]:
|
||||||
if str(c_where[1]) == session_user_id:
|
c_where[1].append(session_user_id)
|
||||||
added = True
|
elif isinstance(c_where[1], str) and c_where[1] != session_user_id:
|
||||||
break
|
c_where[1] = [c_where[1], session_user_id]
|
||||||
else:
|
added = True
|
||||||
c_where[1] = (c_where[1], session_user_id)
|
break
|
||||||
added = True
|
|
||||||
|
|
||||||
if not added:
|
if not added:
|
||||||
custom_where.append(['session_history.user_id', session.get_session_user_id()])
|
custom_where.append(['session_history.user_id', [session.get_session_user_id()]])
|
||||||
|
|
||||||
group_by = ['session_history.reference_id'] if grouping else ['session_history.id']
|
group_by = ['session_history.reference_id'] if grouping else ['session_history.id']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue