fixed the bug on login event check

This commit is contained in:
pythagoraswitch 2018-08-03 19:17:44 +02:00
parent 8d75ad8c0a
commit a73aff927a

View file

@ -86,7 +86,7 @@ class Engine:
def get_videos(self, user): def get_videos(self, user):
if user.get('events', [])[0].get("event")=="login": if user.get('events', [{}])[0].get("event")=="login":
return self.get_recommendations(user) return self.get_recommendations(user)
channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()} channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()}