fallback if user has no events
This commit is contained in:
parent
cecd4f770f
commit
af93e105cd
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class Engine:
|
|||
playlists = playlists[channels['keywords']:]
|
||||
# Count tags for the user
|
||||
count = {}
|
||||
for event in user['events']:
|
||||
for event in user.get('events', []):
|
||||
if 'product' in event['data']:
|
||||
count[event['data']['product']] = count.get(
|
||||
event['data']['product'], 0
|
||||
|
|
Loading…
Reference in a new issue